Skip to content

ci(docs): check production and preview builds on pull requests - #777

Open
myasnikovdaniil wants to merge 1 commit into
fix/docs-entry-linksfrom
ci/docs-build-checks
Open

myasnikovdaniil wants to merge 1 commit into
fix/docs-entry-linksfrom
ci/docs-build-checks

Conversation

@myasnikovdaniil

Copy link
Copy Markdown
Contributor

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 main after 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.

@coderabbitai

coderabbitai Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f413c79c-5055-4d6c-902c-9e3436487b05

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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>

This branch has not been deployed

No deployments
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.

2 participants