Zensical¶
Builds a Zensical documentation site and deploys it to GitHub Pages.
Usage¶
Create a .github/workflows/docs.yaml file:
.github/workflows/docs.yaml
---
name: Documentation
on:
push:
branches: [main]
pull_request: # (1)
permissions: {} # (2)
jobs:
docs:
permissions:
contents: read # (3)
pages: write # (4)
id-token: write # (5)
uses: projectpotos/actions/.github/workflows/release-zensical.yaml@v0.0.0
with:
deploy: ${{ github.event_name != 'pull_request' }} # (6)
- On pull requests the site is built (validating the docs) but not deployed.
- Deny all permissions at the workflow level as a secure baseline.
- Required to check out the documentation source.
- Required to deploy the artifact to GitHub Pages (gated on the
deployinput). - Required to authenticate the Pages deployment via OIDC (gated on the
deployinput). - Build-only on PRs; build and deploy on pushes to
main.
Inputs¶
| Input | Description | Required | Default |
|---|---|---|---|
deploy |
Deploy the built site to GitHub Pages | No | true |