vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Publish the docs site on every push to main
fbc5c5b9c89293eb2d090cc966f11896b957eb5a · Keenan Nemetz · 20d ago · parent 34a6094a
Publish the docs site on every push to main The documentation had no CI path to publication: mkdocs.yml renders dist/site and sites.md describes `vole pages deploy`, but nothing ran it. Add a docs workflow triggered by pushes to main that builds the site with mkdocs build --strict from the pinned requirements.txt in the verify image, then publishes the output with the job's pages field. Main alone is the trigger. Every branch already builds the site in verify.yaml, and a branch that has not landed must not change what visitors read. Reusing the verify image and requirements keeps the deployed page identical to the one the push checked. Refs: 01M7BD7M86KN9ZGETZRC5BHYDF
.vole/workflows/docs.yaml +37
| @@ -0,0 +1,37 @@ | |||
| 1 | # Builds the MkDocs site and publishes it as the repository's website on every | ||
| 2 | # push to main. The trigger is main alone: every branch builds the same site in | ||
| 3 | # verify.yaml, but only what lands is what a visitor reads. | ||
| 4 | # | ||
| 5 | # The job reuses the verify image and the pinned requirements.txt, so the page a | ||
| 6 | # push passed is the page the deploy publishes. It declares network: bridge for | ||
| 7 | # the pip install; the pages deploy itself is performed by the runner after the | ||
| 8 | # steps pass, not from inside the container. | ||
| 9 | # | ||
| 10 | # Vole refuses a deploy whose run is no longer the newest commit on the branch, | ||
| 11 | # so a queued older run cannot roll the site back. mkdocs.yml sets site_dir, and | ||
| 12 | # `vole pages deploy dist/site` is the snapshot the job publishes here. | ||
| 13 | version: 1 | ||
| 14 | name: Docs | ||
| 15 | on: | ||
| 16 | push: | ||
| 17 | branches: [main] | ||
| 18 | jobs: | ||
| 19 | docs: | ||
| 20 | name: Build and publish the site | ||
| 21 | # The verify image carries python3 and python3-venv, and the same base digest | ||
| 22 | # and toolchain a passing push used. See .vole/images/verify.yaml. | ||
| 23 | image-file: verify | ||
| 24 | network: bridge | ||
| 25 | steps: | ||
| 26 | # --strict turns a broken nav entry, template, or relative link into a | ||
| 27 | # failed job, so a partial build never replaces a working site. | ||
| 28 | - name: build | ||
| 29 | run: | | ||
| 30 | set -eu | ||
| 31 | venv="${TMPDIR:-/tmp}/vole-docs-venv" | ||
| 32 | python3 -m venv "$venv" | ||
| 33 | "$venv/bin/pip" install --disable-pip-version-check --quiet --requirement requirements.txt | ||
| 34 | "$venv/bin/mkdocs" build --strict | ||
| 35 | timeout: 10m | ||
| 36 | pages: | ||
| 37 | path: dist/site | ||