Skip to content

chore(Docs): build the docs in CI and publish on merge to master - #2210

Merged
DerManoMann merged 3 commits into
zircote:masterfrom
DerManoMann:fix/docs-roadmap-link
Sep 21, 2026
Merged

DerManoMann merged 3 commits into
zircote:masterfrom
DerManoMann:fix/docs-roadmap-link

Conversation

@DerManoMann

@DerManoMann DerManoMann commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

The documentation site is built with vitepress, which fails the build on a dead link.
Nothing ran that build before a merge: gh-pages.yml is workflow_dispatch only, and
composer docs:check verifies documented code against the source without resolving links.
A dead link introduced in #2204 merged green and sat on master until the next manual
deploy, which failed and pointed at the dispatch rather than at the commit behind it.

Publishing had the same manual step — the site followed master only when someone
remembered to dispatch it.

Building the docs on every pull request also makes the toolchain worth pinning.
docs/package-lock.json has been ignored since #1084, when vitepress build only ever ran
from a manual dispatch and there was nothing to keep reproducible. Without it the new check
cannot resolve an npm cache path and fails before it builds anything, and the deploy — a bare
npm install against no lockfile — published whatever vitepress: ^1.6 resolved to on the
day. Tracking it puts the check and the deploy on the same versions.

Changes

  • Add .github/workflows/docs.yml, running composer docs:build on pull requests.
  • Trigger gh-pages.yml on pushes to master, with a concurrency group and a dry_run
    only a dispatch can set.
  • Track docs/package-lock.json, and give gh-pages.yml setup-node and npm ci, as
    spec-validation.yml already does.
  • Watch npm in / and /docs with dependabot, grouped into one pull request. The root
    lockfile has had no update path since Replace Spectral with Redocly for spec validation #2045 added it.
  • Link ROADMAP.md from docs/dev/testing.md by URL, as the other references to
    repository root files already do.

The site's srcDir is docs/, so a relative link out of that tree resolves
to no page and fails the build. Every other reference to a repository
root file already uses an absolute URL.
Add docs.yml, running composer docs:build on pull requests against master
and 5.x.

gh-pages.yml gains a push trigger on master so the published site follows
master without a manual dispatch, a concurrency group so two merges cannot
race onto the gh-pages branch, and a dry_run expression that only a
workflow_dispatch can make true.
`docs/package-lock.json` has been ignored since zircote#1084, when `vitepress build` only
ever ran from a manual dispatch and there was nothing to keep reproducible. Running
it on every pull request changes that premise: `docs.yml` already reads the lockfile
for the npm cache and `npm ci`, so without it the check cannot resolve a cache path
and fails before it builds anything.

- Track `docs/package-lock.json`.
- Give `gh-pages.yml` `setup-node` and `npm ci`, as `spec-validation.yml` already
  does. It ran a bare `npm install` against no lockfile, so the published site was
  built from whatever `vitepress: ^1.6` resolved to that day.
- Watch `npm` in `/` and `/docs` with dependabot, grouped into one pull request.
  The root lockfile has had no update path since zircote#2045 added it.
@DerManoMann
DerManoMann merged commit f52b544 into zircote:master Sep 21, 2026
19 checks passed
@DerManoMann
DerManoMann deleted the fix/docs-roadmap-link branch September 21, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant