Skip to content

Commit

Permalink
Merge pull request #2 from textbook/configurable-branch
Browse files Browse the repository at this point in the history
Allow env var to override deployment branch
  • Loading branch information
nelsonjchen authored Jun 20, 2019
2 parents 8b3ad21 + daad1cd commit adad1db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Please ensure a `requirements.txt` is present for your site and installs
- `GIT_DEPLOY_KEY`: provide the private key for a [deploy key][1]
- *WARNING*, this should be considered deprecated. A future version of this action will use the `GITHUB_TOKEN` secret instead.

## Environment variables

- `GH_PAGES_BRANCH` (optional): override the default `gh-pages` deployment branch

## History

Extracted from https://github.com/desertpy/desertpy-pelican.
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo '=================== Publish to GitHub Pages ==================='
cd output
# shellcheck disable=SC2012
remote_repo="[email protected]:${GITHUB_REPOSITORY}.git"
remote_branch="gh-pages"
remote_branch=${GH_PAGES_BRANCH:=gh-pages}
git init
git remote add deploy "$remote_repo"
git checkout $remote_branch || git checkout --orphan $remote_branch
Expand Down

0 comments on commit adad1db

Please sign in to comment.