Skip to content

Commit

Permalink
Merge pull request #11 from gerrowadat/master
Browse files Browse the repository at this point in the history
(Re-)create CNAME file for custom domains in the gh-pages branch
  • Loading branch information
nelsonjchen authored May 2, 2021
2 parents 5ba6418 + 6c1ff7f commit a115789
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ in the virtual environment your pelican site is developed in.
## Environment variables

- `GH_PAGES_BRANCH` (optional): override the default `gh-pages` deployment branch
- `GH_PAGES_CNAME` (optional): specify the custom domain you've configured (if any)
- `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.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ inputs:
description: 'override the default `gh-pages` deployment branch'
required: false
default: 'gh-pages'
GH_PAGES_CNAME:
description: 'specify the custom domain configured for the output branch'
required: false
default: none
PELICAN_CONFIG_FILE:
description: 'override the default `pelicanconf.py` config file'
required: false
Expand Down
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ git remote add deploy "$remote_repo"
git checkout $remote_branch || git checkout --orphan $remote_branch
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
if [ "$GH_PAGES_CNAME" != "none" ]
then
echo "$GH_PAGES_CNAME" > CNAME
fi
git add .
echo -n 'Files to Commit:' && ls -l | wc -l
timestamp=$(date +%s%3N)
Expand Down

0 comments on commit a115789

Please sign in to comment.