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

fix: make it possible to deploy from SOURCE_BRANCH #102

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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