Skip to content

Commit

Permalink
Support "false" value for USE_SSH env var
Browse files Browse the repository at this point in the history
Docusaurus 1.X treats any non-'true' value to be false, but Docusaurus 2.X currently treats any non-empty string to be truthy here. This change should unbreak projects that migrate from V1 to V2 with `USE_SSH=false` environment variables.
  • Loading branch information
yns88 authored Oct 24, 2019
1 parent 3acf880 commit a029435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/docusaurus/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export async function deploy(siteDir: string): Promise<void> {
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';

const useSSH = process.env.USE_SSH;
const remoteBranch = useSSH
const remoteBranch = (useSSH && useSSH.toLowerCase() !== 'false')
? `git@${githubHost}:${organizationName}/${projectName}.git`
: `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`;

Expand Down

0 comments on commit a029435

Please sign in to comment.