mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +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.
|
||||
- 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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue