Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
fix: make it possible to deploy from SOURCE_BRANCH
Browse files Browse the repository at this point in the history
Merge pull request #102 from dominik-stypula-polcode/dominik-stypula-polcode-patch-1
  • Loading branch information
jimmyandrade authored May 12, 2021
2 parents 4c73771 + 931ef4d commit d733771
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/storybook_to_ghpages
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ publishUtils.exec(`git config user.email ${JSON.stringify(config.gitEmail)}`);
// disable GPG signing
publishUtils.exec('git config commit.gpgsign false');

// check if source branch argument is set, and checkout to it
if(args.SOURCE_BRANCH) {
publishUtils.exec(`git checkout -b ${JSON.stringify(args.SOURCE_BRANCH)}`);
console.log(`=> Deploying from source branch: ${JSON.stringify(args.SOURCE_BRANCH)}`);
}

// The first and only commit to this new Git repo contains all the
// files present with the commit message "Deploy to GitHub Pages".
publishUtils.exec('git add .');
Expand Down

0 comments on commit d733771

Please sign in to comment.