Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(v2): v1 backward compatibility for USE_SSH env var #1880

Merged
merged 2 commits into from
Oct 27, 2019
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