Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG-2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 4 additions & 3 deletions packages/docusaurus/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ 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
? `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
Expand Down