fix(v2): logic error while deciding deploymentBranch (#3273)

This commit is contained in:
Hani Mohammed 2020-08-14 15:37:43 +05:30 committed by GitHub
parent 0cc78fdd41
commit 7cc44823eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,9 +66,8 @@ export default async function deploy(
// github.io indicates organization repos that deploy via master. All others use gh-pages. // github.io indicates organization repos that deploy via master. All others use gh-pages.
const deploymentBranch = const deploymentBranch =
process.env.DEPLOYMENT_BRANCH || projectName.indexOf('.github.io') !== -1 process.env.DEPLOYMENT_BRANCH ||
? 'master' (projectName.indexOf('.github.io') !== -1 ? 'master' : 'gh-pages');
: 'gh-pages';
const githubHost = const githubHost =
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com'; process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';