Jekyll Site¶
Build a Jekyll site, run HTMLProofer checks, and optionally deploy to GitHub Pages.
Usage¶
jobs:
site:
uses: athackst/ci/.github/workflows/jekyll_site.yml@main
with:
pages: true
path: docs
secrets:
token: ${{ secrets.CI_BOT_TOKEN }}
Inputs¶
| Name | Description | Default |
|---|---|---|
pages |
(optional) Deploy to GitHub Pages after build and test. | true |
enablement |
(optional) Try to enable Pages for the repository if needed. | false |
htmlproofer-ignore-urls |
(optional) Newline-delimited URLs or regexes for HTMLProofer to ignore. | "" |
path |
(optional) Path to the Jekyll project directory. | . |
artifact-name |
(optional) Artifact name for the built site. | github-pages |
Secrets¶
| Name | Description | Default |
|---|---|---|
token |
(optional) Token override used by configure-pages. |
${{ github.token }} |
Permissions¶
- Build/test only needs read access.
- Deployment needs
contents: write,pages: write, andid-token: writein the caller job. - If
enablement: true, the token must be able to enable Pages for the repository.
Advanced¶
- Builds the site from the configured
pathwith Bundler cache enabled. - Reuses
htmlproofer_site.ymlfor post-build link checking. - Deploys only when
pages: trueand the ref isrefs/heads/main. - Exposes
hostandbase-pathinternally so HTMLProofer can validate Pages-style links correctly.
Examples¶
Testing on a PR:
site.yml is no longer automatically tested on PRs. If you want to test on a PR add the following to your test workflow