feat: gate root docs deploys on releases, serve main under /preview/ - #234
Conversation
The root site now deploys only from a release (the release workflow dispatches the docs workflow at the tag, since GITHUB_TOKEN-created releases cannot fire the release trigger) or a manual dispatch. Docs pushes to main deploy to /preview/ instead, and both preview flavors emit a robots noindex meta so they never compete with the root site in search results.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@coderabbitai full-review |
|
✅ Action performedFull review finished. |
📝 WalkthroughWalkthroughDocumentation deployment now responds to published releases and manual dispatches for production, with release workflows dispatching the documentation workflow at the release tag. Main branch builds deploy to a preserved preview directory, while pull-request and main previews receive 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/docs.yml:
- Around line 105-108: Disable the default dependency/build cache in the
actions/setup-go step identified by go-version-file: docs/go.mod by setting its
cache option to false, while leaving Go version setup unchanged. Ensure the
privileged documentation deployment job cannot restore or share setup-go cache
entries with the unprivileged PR-preview job.
In @.github/workflows/release.yml:
- Around line 107-114: Update the “Deploy docs for the release” step to pass
steps.latest.outputs.output through an environment variable, then reference that
variable in the gh workflow run command instead of interpolating the GitHub
expression directly in run. Preserve the existing docs.yml dispatch and
release-tag ref behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 2c19e121-5551-43e3-a5cc-0f6ffae2b8c9
📒 Files selected for processing (3)
.github/workflows/docs.yml.github/workflows/release.ymldocs/layouts/_partials/custom/head-end.html
The release tag predates the pin-update PR, so the root deploy at the tag still shows the previous release's wasm url/sha in its examples. Deploy again from main when the release/update-readme-* branch merges; main is then exactly the tag plus the pin commit.
The docs root now only deploys on a release (or manual dispatch), while the current state of main lives at /preview/ and PR previews stay as they are - both noindexed.