Skip to content

Commit

Permalink
Prettify.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tales Porto committed Apr 1, 2021
1 parent 9756373 commit a31fd37
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/docusaurus/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,19 @@ export default async function deploy(

const githubHost =
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
const githubPort =
process.env.GITHUB_PORT || siteConfig.githubPort;
const githubPort = process.env.GITHUB_PORT || siteConfig.githubPort;

const gitPass: string | undefined = process.env.GIT_PASS;
let gitCredentials = `${gitUser}`;
if (gitPass) {
gitCredentials = `${gitCredentials}:${gitPass}`;
}

const sshRemoteBranch: string = `ssh://git@${githubHost}${githubPort ? ':' + githubPort : ''}/${organizationName}/${projectName}.git`;
const nonSshRemoteBranch: string = `https://${gitCredentials}@${githubHost}${githubPort ? ':' + githubPort : ''}/${organizationName}/${projectName}.git`;
const githubAddress = `${githubHost}${githubPort ? ':' + githubPort : ''}`;
const githubPath = `${organizationName}/${projectName}`;

const sshRemoteBranch: string = `ssh://git@${githubAddress}/${githubPath}.git`;
const nonSshRemoteBranch: string = `https://${gitCredentials}@${githubAddress}/${githubPath}.git`;

const remoteBranch =
useSSH && useSSH.toLowerCase() === 'true'
Expand Down

0 comments on commit a31fd37

Please sign in to comment.