mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 00:17:14 +02:00
Add ssh option to publish script
This commit is contained in:
parent
9d3afe2412
commit
37174fd305
2 changed files with 10 additions and 2 deletions
|
@ -16,7 +16,15 @@ const CIRCLE_BRANCH = process.env.CIRCLE_BRANCH;
|
|||
const CIRCLE_PROJECT_USERNAME = process.env.CIRCLE_PROJECT_USERNAME;
|
||||
const CIRCLE_PROJECT_REPONAME = process.env.CIRCLE_PROJECT_REPONAME;
|
||||
const CI_PULL_REQUEST = process.env.CI_PULL_REQUEST;
|
||||
const remoteBranch = `https://${GIT_USER}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git`;
|
||||
|
||||
const USE_SSH = process.env.USE_SSH;
|
||||
|
||||
let remoteBranch;
|
||||
if (USE_SSH === "true") {
|
||||
remoteBranch = `git@github.com:${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git`;
|
||||
} else {
|
||||
remoteBranch = `https://${GIT_USER}@github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}.git`;
|
||||
}
|
||||
|
||||
// build static html files, then push to gh-pages branch of specified repo
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue