mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-09 14:22:27 +02:00
misc(v2): v1 backward compatibility for USE_SSH env var (#1880)
* misc(v2): address comments * misc(v2): update CHANGELOG
This commit is contained in:
parent
421598eb65
commit
812a30be57
2 changed files with 5 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
||||||
- Convert sitemap plugin to TypeScript.
|
- 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.
|
- 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.
|
- 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
|
## 2.0.0-alpha.31
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,8 @@ export async function deploy(siteDir: string): Promise<void> {
|
||||||
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
|
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
|
||||||
|
|
||||||
const useSSH = process.env.USE_SSH;
|
const useSSH = process.env.USE_SSH;
|
||||||
const remoteBranch = useSSH
|
const remoteBranch =
|
||||||
|
useSSH && useSSH.toLowerCase() === 'true'
|
||||||
? `git@${githubHost}:${organizationName}/${projectName}.git`
|
? `git@${githubHost}:${organizationName}/${projectName}.git`
|
||||||
: `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`;
|
: `https://${gitUser}@${githubHost}/${organizationName}/${projectName}.git`;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue