mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-17 11:07:07 +02:00
Allow deploying docs from a branch other than master
Still have to deploy to `gh-pages`
This commit is contained in:
parent
59d5b58aa5
commit
16aa42a705
2 changed files with 10 additions and 3 deletions
|
@ -31,11 +31,16 @@ if (!shell.which("git")) {
|
|||
shell.exit(1);
|
||||
}
|
||||
|
||||
if (CI_PULL_REQUEST || CIRCLE_BRANCH !== `master`) {
|
||||
shell.echo("Skipping deploy");
|
||||
if (CI_PULL_REQUEST) {
|
||||
shell.echo("Skipping deploy on a pull request");
|
||||
shell.exit(0);
|
||||
}
|
||||
|
||||
if (CIRCLE_BRANCH === "gh-pages") {
|
||||
shell.echo("Cannot deploy from a gh-pages branch. Only to it");
|
||||
shell.exit(1);
|
||||
}
|
||||
|
||||
if (shell.exec(`node ${__dirname}/build-files.js`).code) {
|
||||
shell.echo("Error: generating html failed");
|
||||
shell.exit(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue