Repository navigation
Workflow docs pages
What it does. Builds a static documentation site on every pull request and deploys it to GitHub Pages from the default branch only.
Built for MkDocs (mkdocs build --strict after pip install -e ".[docs]"), but both commands are inputs, so anything that writes a
directory of static files fits: Sphinx, mdBook, a script.
Why it exists. A strict build fails a pull request that breaks a link, so it is caught in review and not published as a 404. It was
written from Hammunition's pages.yml; the project-specific parts (its site, its extra, its nav) stayed there.
| Job | Holds | Notes |
|---|---|---|
build |
contents: read and no token |
Runs your install and build commands. The artifact is uploaded exactly when the deploy will run |
deploy |
pages: write, id-token: write
|
Default branch only, never a pull request. Runs none of your commands. Fixed concurrency group pages: queues behind a running deployment and never cancels one |
on:
push: { branches: [main] }
pull_request:
workflow_dispatch:
jobs:
docs:
uses: ChiefGyk3D/git-your-ship-together/.github/workflows/docs-pages.yml@<sha> # vX.Y.Z
permissions:
contents: read
pages: write # the deploy job only
id-token: write # the deploy job only: Pages verifies itThe owner sets one thing once: Settings, Pages, Build and deployment, Source: GitHub Actions. Until then deploy fails with a
message that says so and names the URL; build is unaffected. deploy: false keeps a repository building only until the setting is made.
The default egress list has not been measured against a caller, which is why the default policy is audit.
Inputs (9), read from docs-pages.yml:
| Input | Type | Default | Meaning |
|---|---|---|---|
python-version |
string | 3.11 |
Python used to build the site. |
install-command |
string | pip install -e ".[docs]" |
Shell run before the build, e.g. the project's docs extra. |
build-command |
string | mkdocs build --strict |
Shell that builds the site into site-dir. A non-zero exit fails the job, so a strict build (broken links, missing pages) fails the pull request. |
site-dir |
string | site |
Directory the build writes, relative to the repository root. It is uploaded as the Pages artifact. |
deploy |
boolean | true |
Upload and deploy on a run of the default branch. false only builds, which is what a repository wants while it tries the workflow before it has enabled Pages. |
egress-policy |
string | audit |
harden-runner egress policy for every job - audit logs outbound connections, block allows only allowed-endpoints. |
allowed-endpoints |
string | api.github.com:443 files.pythonhosted.org:443 github.com:443 pypi.org:443 |
harden-runner allow-list for block, space-separated host:port entries. Wildcards are not supported and a newline-separated list matches nothing. The runner's own infrastructure needs no entry; a build that fetches fonts or plugins needs its hosts in extra-allowed-endpoints. |
extra-allowed-endpoints |
string | empty | Appended to allowed-endpoints, for hosts only this repository reaches. Same format. |
timeout-minutes |
number | 10 |
Per-job timeout. |
It never deploys from a pull request, never lets your build command run beside the Pages write, and never publishes an empty or missing site directory.
Generated from docs/wiki/ at commit f3af2fa0bae3. Do not edit this wiki: the next push to main replaces every page. Corrections go to docs/wiki/ by pull request.
GYST
- Home
- Why GYST exists
- Getting started
- Design rules
- Secrets: Doppler and OIDC
- Security scanning explained
- The baseline and the weekly audit
- Releases and supply chain
- Keeping a project board current
- Adopting GYST in your own project
- Glossary
- Roadmap
Learn and contribute
- Learning path
- Which workflow do I need?
- Repository map
- Egress control
- Troubleshooting
- Lessons learned
- Testing and the contract
- Contributing and developing
- Maintaining this wiki
- Verify main
- FAQ
CI
Security
Release
- container-release
- python-docker-release
- python-package-release
- artifact-release
- verify-published
- base-image-digest
Docs and project
- docs-pages
- wiki-publish
- project-sync
- threat-model
- lory-audit
- agent-scan
- token-drift
- node-typecheck
- pr-title-lint
- vendored-drift
- upstream-sync
- repin
- pin-comments
Tools