Repository navigation
ci(docs): check production and preview builds on pull requests - #777
myasnikovdaniil wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
myasnikovdaniil The workflow looks right to me, one commit needs squashing before merge.
I ran the production and preview steps from this PR on a trial merge with main, with Hugo 0.164.0. Both builds and all five output checks pass. The fixture suite passes in about 7 seconds, so the extra CI cost is small. A broken ref added under next/ fails the preview build with REF_NOT_FOUND. PR runs get a read-only token and no secrets, and the deploy job runs only from main after both matrix jobs pass.
The blocking part is 1306bf8. It fixes a bug that f990c4f introduced in this same PR. The repo merges with merge commits, so main would keep a fix for a problem it never had. Please squash it into f990c4f.
I also broke the real production output in a few ways to see what the checker catches. It fails on a deleted unversioned legacy copy, a wrong canonical on one, a meta refresh in a copy, and next/ in production. It still passes when I delete /docs/v1/install/talos/kexec/index.html, when I point the canonical of /docs/v1/reference/applications/mysql/ somewhere else, and when I delete the whole docs/v1.6/ archive. test_legacy_urls reads only the registry keys, and nothing checks that numbered versions are still published. The fixtures from #775 cover the /docs/v1/ forms in code, so I'm not blocking on this. Checking the /docs/<major>/ forms in test_legacy_urls plus a per-version presence check would close the gap.
JFYI: .docs-mirror.json is served on cozystack.io today, because the upload step includes hidden files. Deleting it from public/ before the upload would cover A18 from the epic, if you want it in this PR.
1306bf8 to
e3aafa1
Compare
Aleksei Sviridkin (lexfrei)
left a comment
There was a problem hiding this comment.
Thanks, the fix is squashed and the tree is identical to what I tested before. One thing for after #776 lands: against current main this conflicts in hugo.yaml and the fixtures file, and main has dropped the Dart Sass step, so it should go in the rebase too.
Build the preview tree on pull requests so broken refs under next/ are caught before merge, and check the production output that Pages publishes. Keep build jobs read-only and gate the Pages artifact and deployment to main. Fail dependency installation instead of continuing after npm errors. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
df0ea96 to
5be2091
Compare
e3aafa1 to
d54e3a3
Compare
|
Aleksei Sviridkin (@lexfrei) rebased on updated #776 and current main. Only conflict was Hugo install step in |
PRs currently never run the Pages build, and production skips
docs/next/. I added production and preview checks to the existing workflow, including legacy URLs and version rollover.PR jobs use read-only permissions, publication stays on
mainafter both builds pass.Verified locally with Hugo extended 0.164.0, 26 fixtures, five output checks per environment, 129 translator tests and actionlint. Broken references in
next/fail preview, and failed npm installs now stop the build.Stacked on #776, addresses #496 and #653 as part of #773.