Skip to content

Commit

Permalink
Using the default protocol port instead of define it on the code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tales Porto committed Apr 1, 2021
1 parent 9227a22 commit 9756373
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/docusaurus/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,16 @@ export default async function deploy(
const githubHost =
process.env.GITHUB_HOST || siteConfig.githubHost || 'github.com';
const githubPort =
process.env.GITHUB_PORT || siteConfig.githubPort || (useSSH && useSSH.toLowerCase() === 'true'
? '22'
: '433');
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}/${organizationName}/${projectName}.git`;
const nonSshRemoteBranch: string = `https://${gitCredentials}@${githubHost}:${githubPort}/${organizationName}/${projectName}.git`;
const sshRemoteBranch: string = `ssh://git@${githubHost}${githubPort ? ':' + githubPort : ''}/${organizationName}/${projectName}.git`;
const nonSshRemoteBranch: string = `https://${gitCredentials}@${githubHost}${githubPort ? ':' + githubPort : ''}/${organizationName}/${projectName}.git`;

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

0 comments on commit 9756373

Please sign in to comment.