Skip to content

Commit

Permalink
Merge pull request #8 from GabrielCappelli/master
Browse files Browse the repository at this point in the history
Allow env var to override content folder
  • Loading branch information
nelsonjchen authored Mar 19, 2021
2 parents 1c5878b + 531b77f commit 5ba6418
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ in the virtual environment your pelican site is developed in.
## Environment variables

- `GH_PAGES_BRANCH` (optional): override the default `gh-pages` deployment branch
- `PELICAN_CONFIG_FILE` (optional): override the default `pelicanconf.py` config file
- `PELICAN_CONFIG_FILE` (optional): override the default `pelicanconf.py` config file
- `PELICAN_CONTENT_FOLDER` (optional): 'override the default `content` content folder'
- `GITHUB_TOKEN`: (required) should be `${{secrets.GITHUB_TOKEN}}`, see [the workflow demo in the demo repository for an example of this][workflow_demo]. This secret is fulfilled by GitHub.

## Demo
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ inputs:
description: 'override the default `pelicanconf.py` config file'
required: false
default: pelicanconf.py
PELICAN_CONTENT_FOLDER:
description: 'override the default `content` content folder'
required: false
default: content
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "ACTOR: $GITHUB_ACTOR"
echo '=================== Install Requirements ==================='
pip install -r requirements.txt
echo '=================== Build site ==================='
pelican content -o output -s ${PELICAN_CONFIG_FILE:=pelicanconf.py}
pelican ${PELICAN_CONTENT_FOLDER:=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 5ba6418

Please sign in to comment.