diff --git a/lib/publish-gh-pages.js b/lib/publish-gh-pages.js index f45a36b2b95f..6ea086faaed3 100755 --- a/lib/publish-gh-pages.js +++ b/lib/publish-gh-pages.js @@ -34,8 +34,6 @@ 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'; -const PROJECT_PATH = - PROJECT_NAME.indexOf('.github.io') !== -1 ? '' : PROJECT_NAME; if (!ORGANIZATION_NAME) { shell.echo( @@ -109,7 +107,7 @@ shell.exec('git rm -rf .'); shell.cd('../..'); -fromPath = path.join('build', PROJECT_PATH, '/'); +fromPath = path.join('build', `${PROJECT_NAME}`); toPath = path.join('build', `${PROJECT_NAME}-${DEPLOYMENT_BRANCH}`); // In github.io case, project is deployed to root. Need to not recursively // copy the deployment-branch to be. @@ -152,7 +150,7 @@ fs.copy( } else if (commitResults.code === 0) { // The commit might return a non-zero value when site is up to date. shell.echo( - `Website is live at: https://${ORGANIZATION_NAME}.github.io/${PROJECT_PATH}` + `Website is live at: https://${ORGANIZATION_NAME}.github.io/${PROJECT_NAME}` ); shell.exit(0); }