Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.
Open
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Remember that you may also have to adjust your [repository settings](https://hel

Because this action deploys to separate, "deploy-only" branches, you can not use it if you want to deploy from a repo subdirectory such as `docs/`.
In those cases you really don't need a GitHub Action, because you would be committing the build artifacts yourself.
For details see the [GitHub Pages Documentation](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).
For details see the [GitHub Pages Documentation](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).

There are already great GitHub actions to use static site generators *and* then deploy to GitHub Pages (for [jekyll](https://github.com/helaili/jekyll-action), [jekyll](https://github.com/BryanSchuetz/jekyll-deploy-gh-pages), [zola](https://github.com/shalzz/zola-deploy-action) and surely many more to come).
This action isn't that, though I've borrowed much of the git action from these works.
Expand All @@ -40,9 +40,10 @@ The discussion is documented [here](https://github.com/maxheld83/ghaction-ghpage

## Environment Variables

Just `BUILD_DIR`, the build directory relative to your repository root.
You can also pass `.` if you want to push your repository root.

|Variable|Meaning|
|-----|-----|
|`BUILD_DIR`|The build directory relative to your repository root. You can also pass `.` if you want to push your repository root.|
|`GH_CNAME`|Your custom domain name. Will be written to the `CNAME` file in your `BUILD_DIR`.|

## Arguments

Expand Down
6 changes: 6 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ if [[ "$REPONAME" == "$GHIO" ]]; then
else
REMOTE_BRANCH="gh-pages"
fi && \
if [[ -z "$GH_CNAME" ]]; then
echo "No CNAME is set"
else
echo "Setting CNAME"
echo $GH_CNAME > CNAME
fi && \
git init && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
Expand Down