Publish the documentation from a stable branch - #7057
Conversation
|
Claude finished @gustavosbarreto's task in 1m 22s —— View job Code Review CompleteReviewed 5 files across code quality, security, testing, language patterns, and architecture — no new issues found. The code looks good as-is. The channel logic is consistent end to end: To request another review round, comment |
|
Documentation preview: https://0446152d.shellhub-docs.pages.dev |
|
Documentation preview: https://9c8504d0.shellhub-docs.pages.dev |
e14c771 to
fca0b77
Compare
|
Documentation preview: https://bd34b899.shellhub-docs.pages.dev |
The site is published continuously from master, so a page describing a feature that has not shipped in any release is visible to readers who run the released version. Add a banner, shown on every page unless the build declares itself as stable through PUBLIC_DOCS_CHANNEL, saying where the build comes from and linking to the documentation for the released version.
Only docs/stable publishes to the site; master and open pull requests land on preview URLs, which lets documentation for an unreleased feature be merged without reaching readers. Drop the path filter from the push trigger. docs/stable is moved to the release tag with a force-push, which carries no dependable list of changed files, so a filtered trigger would skip the release.
fca0b77 to
7dec13a
Compare
|
Documentation preview: https://185eea78.shellhub-docs.pages.dev |
The documentation site is published continuously from master. A page written for
a feature that has not shipped yet becomes visible the moment it is merged, so
writing documentation alongside the feature means publishing it early.
This splits the site in two. The
docs/stablebranch becomes the productionbranch of the Cloudflare Pages project and is the only one that publishes to the
site; it is moved to the release tag when a version is cut. Master and open pull
requests land on preview URLs, so documentation can be merged together with the
feature it describes without reaching readers.
A build that does not come from
docs/stablecarries a banner saying it isbuilt from master and may describe features that are not in any release yet,
linking to the documentation for the released version.
robots.txtis left alone: it still disallows everything, which is correctwhile the site is served from docsv2. When it takes over the published address,
that file becomes the knob that lets the stable build be indexed and keeps the
builds from master out.
Manual steps
Merging this is not enough. After it lands, in this order:
Create the branch from the tag of the current release and push it:
Wait for Docs CD to finish publishing that branch.
In the Cloudflare Pages project
shellhub-docs, change the production branchto
docs/stable.Run Docs CD on master again, from the Actions tab. Until master stops being
the production branch it publishes to the root of the project and has no
branch alias, so this run is what creates
master.shellhub-docs.pages.devand puts the unreleased documentation there.Doing 3 before 1 leaves the project without a production branch.
Cutting a release
Moving the published documentation to a new version is one command:
A fix to the published documentation has to land on master first and be
cherry-picked to
docs/stable. A commit that exists only ondocs/stableisdiscarded by the next release.