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

* misc(v2): address comments

* misc(v2): update CHANGELOG
This commit is contained in:
Yunus Rahbar 2019-10-27 14:36:45 -07:00 committed by Yangshun Tay
parent 421598eb65
commit 812a30be57
2 changed files with 5 additions and 3 deletions

View file

@ -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