1 Commits
Author SHA1 Message Date
CJandClaude Opus 5.5 da804f0568 ci: devvm.dev shows the latest release's docs, next.devvm.dev shows main's (#16)
Two docs sites, from one Docs workflow (`.github/workflows/docs.yml`):

- **devvm.dev** shows the latest release's docs. The `release` job
builds a tag's `docs/` and the `deploy` job deploys it to GitHub Pages
(`github-pages` environment), on a published release that isn't a
prerelease, and on a `workflow_dispatch` with `site=devvm.dev` and `ref`
(a release tag; empty means the latest release, from `gh release view`).
The tag is checked against `^v[0-9]+\.[0-9]+\.[0-9]+$` through `env:`
before it's used, and checked out as `refs/tags/<tag>`. Pushes to main
no longer deploy devvm.dev.
- **next.devvm.dev** shows main's docs. On pushes to main that touch the
docs (the same paths anchor), or a dispatch with `site=next.devvm.dev`,
`check` lints and builds, then `next` builds with `hugo -s docs --minify
--config hugo.yaml,next.yaml`, checks out devvmhq/docs-next with
`DOCS_NEXT_DEPLOY_KEY` (environment `docs-next`, only after the build),
replaces everything but README.md, and commits `Build from devvm <short
sha>` as github-actions[bot], skipping an unchanged build. Its
concurrency group keeps pushes from racing.
- `docs/next.yaml` sets `baseURL: https://next.devvm.dev/`, Hextra's
`params.banner` (a note that links devvm.dev), and `noindex` both as a
site param and through `cascade`, so Hextra's head writes `noindex,
nofollow` on every page. `docs/layouts/robots.txt` adds `Disallow: /`
when the site's `noindex` is set. The build stays in Hugo's production
environment, so Hextra's minified, fingerprinted assets are the same as
devvm.dev's.
- PRs get the same lint and build as before, and nothing runs with an
environment or a secret on `pull_request`. Permissions: `contents: read`
at the top; only `deploy` has `pages: write` and `id-token: write`. The
publishing jobs set `cache: false` on mise-action (zizmor's
cache-poisoning, now that the workflow publishes on `release`), and so
does `check`.
- Docs: Contributing's Maintaining has a new section, The docs sites
(what deploys each, the hand redeploy, the key and environments,
Cloudflare Pages serving devvmhq/docs-next); Contributing's two mentions
of the deploy point at it; Upgrading's Trying a prerelease links
next.devvm.dev.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-07 09:02:34 -07:00