mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 08:49:51 +02:00
feat(v2): allow targeting deployment branch with environment variable (#2396)
This commit is contained in:
parent
8152b47bba
commit
51995fa237
2 changed files with 4 additions and 1 deletions
|
@ -62,7 +62,9 @@ export async function deploy(siteDir: string): Promise<void> {
|
|||
|
||||
// github.io indicates organization repos that deploy via master. All others use gh-pages.
|
||||
const deploymentBranch =
|
||||
projectName.indexOf('.github.io') !== -1 ? 'master' : 'gh-pages';
|
||||
process.env.DEPLOYMENT_BRANCH || projectName.indexOf('.github.io') !== -1
|
||||
? 'master'
|
||||
: 'gh-pages';
|
||||
const githubHost =
|
||||
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue