Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
yangshun committed Jun 2, 2018
1 parent 0142815 commit 50235e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/publish-gh-pages.js
Original file line number Diff line number Diff line change
@@ -35,9 +35,10 @@ const USE_SSH = process.env.USE_SSH;
// github.io indicates organization repos that deploy via master. All others use gh-pages.
const DEPLOYMENT_BRANCH =
PROJECT_NAME.indexOf('.github.io') !== -1 ? 'master' : 'gh-pages';
// for github enterprise support, should be possible to specify a different host than github.com
const GITHUB_DOMAIN = 'github.com';
// For GitHub enterprise, allow specifying a different host.
const GITHUB_HOST =
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
process.env.GITHUB_HOST || siteConfig.githubHost || GITHUB_DOMAIN;

if (!ORGANIZATION_NAME) {
shell.echo(
@@ -154,7 +155,7 @@ fs.copy(
} else if (commitResults.code === 0) {
// The commit might return a non-zero value when site is up to date.
const websiteURL =
GITHUB_HOST === 'github.com'
GITHUB_HOST === GITHUB_DOMAIN
? `https://${ORGANIZATION_NAME}.github.io/${PROJECT_NAME}` // gh-pages hosted repo
: `https://${GITHUB_HOST}/pages/${ORGANIZATION_NAME}/${PROJECT_NAME}`; // GitHub enterprise hosting.
shell.echo(`Website is live at: ${websiteURL}`);

0 comments on commit 50235e6

Please sign in to comment.