Skip to content

Commit

Permalink
Allow env var to override Pelican config file
Browse files Browse the repository at this point in the history
It is common to use pelicanconf.py for local development and then
publishconf.py for production - allowing this to be configurable
lets people manage multiple Pelican configs as required.
  • Loading branch information
textbook committed Aug 1, 2019
1 parent 0745470 commit 80a1c7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Please ensure a `requirements.txt` is present for your site and installs
## Environment variables

- `GH_PAGES_BRANCH` (optional): override the default `gh-pages` deployment branch
- `PELICAN_CONFIG_FILE` (optional): override the default `pelicanconf.py` config file

## History

Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ssh-keyscan -t rsa github.com > /root/.ssh/known_hosts && \
echo "${GIT_DEPLOY_KEY}" > /root/.ssh/id_rsa && \
chmod 400 /root/.ssh/id_rsa
echo '=================== Build site ==================='
pelican content -o output -s pelicanconf.py
pelican content -o output -s ${PELICAN_CONFIG_FILE:=pelicanconf.py}
echo '=================== Publish to GitHub Pages ==================='
cd output
# shellcheck disable=SC2012
Expand Down

0 comments on commit 80a1c7f

Please sign in to comment.