diff --git a/CHANGELOG-2.x.md b/CHANGELOG-2.x.md index 46c03adf1659..db9ce20328bd 100644 --- a/CHANGELOG-2.x.md +++ b/CHANGELOG-2.x.md @@ -7,6 +7,7 @@ - Convert sitemap plugin to TypeScript. - Significantly reduce main bundle size and initial HTML payload on production build. Generated JS files from webpack is also shorter in name. - Refactor dark toggle into a hook. +- Changed the way we read the `USE_SSH` env variable during deployment to be the same as in v1. ## 2.0.0-alpha.31 diff --git a/packages/docusaurus/src/commands/deploy.ts b/packages/docusaurus/src/commands/deploy.ts index b5863e8c6d3b..57f0a5cd6f25 100644 --- a/packages/docusaurus/src/commands/deploy.ts +++ b/packages/docusaurus/src/commands/deploy.ts @@ -67,9 +67,10 @@ export async function deploy(siteDir: string): Promise { process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com'; const useSSH = process.env.USE_SSH; - const remoteBranch = useSSH - ? `git@${githubHost}:${organizationName}/${projectName}.git` - : `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`; + const remoteBranch = + useSSH && useSSH.toLowerCase() === 'true' + ? `git@${githubHost}:${organizationName}/${projectName}.git` + : `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`; // Check if this is a cross-repo publish const currentRepoUrl = shell