Allow deploying docs from a branch other than master

Still have to deploy to `gh-pages`
This commit is contained in:
Joel Marcey 2017-11-17 14:26:08 -08:00
parent 59d5b58aa5
commit 16aa42a705
2 changed files with 10 additions and 3 deletions

View file

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