Summary
Adopt a trunk-based deployment process for this repo: main becomes the single source of truth that auto-deploys on every merge, and unreleased content is hidden by draft flags instead of long-lived staging/release branches.
Goal
The aim is to create a simple deployment management process allow as minimal friction as possible when merging.
- The current two branch process,
public and main, creates complication when merging main into public.
- A multi branch approach, where staged changes are kept on their branch, would result in merge conflicts when managing different branches.
Proposal: Continuous integration with draft contents.
The basic flow:
Write docs → PR to main → CI: build + checks → merge → deploy
Changes are deployed as soon as they land on main.
Truth branch: main
- The source of truth. Auto-deploys on merge.
- Direct pushes disabled; PR-only, with required CI checks (build + link validation).
Unreleased contents:
- New page: Use Starlight's built-in
draft: true frontmatter. Blocks rendering of the page in production build but still visible in pnpm dev. When releasing, create a new PR to flip to draft: false.
- New subsection of page (e.g., one language tab): Use the new
<Draft> component (src/components/Draft.astro). Similar to draft frontmatter, it blocks rendering the section in production build.
All draft contents should be marked with a note on when to release them. This allow maintainer to keep track and release changes accordingly.
Proposed Process
For changes ready to be deployed:
- Create PR onto main for doc changes.
- Merge when ready.
- Auto deploy once merge.
For changes not yet ready (ex: waiting for a release):
- Create a PR onto
main.
- Use the
draft of <Draft> on appropriate contents
- Leave a comment on why they are in draft so they we know later to reveal them.
Examples
1. Adding Client Side Caching Docs
- Core clients add Client Side Caching support .
- Docs page created and merged onto
main with draft: true with a comment For release 2.5.
- Once valkey-glide 2.5 has been release, create a new docs PR to release all 2.5 docs.
2. Updating Ruby CSC Docs
- The ruby client add CSC support.
- Add Ruby code examples to existing page.
- Wrap Ruby code examples in
<Draft> element with a comment For release 1.2.
- Once Ruby release 1.2 is out, create a new docs PR to release their docs.
3. Hot fix Ruby docs
- We found an issue with ruby docs
- Create a PR and fix the issue.
- Merge and changes are deployed immidiately.
Trade-offs
- Unreleased content is visible in the repo (hidden from the site, not secret).
Todo
- We need to implement
<Draft> element which should be simple.
- Change existing github workflows.
- Update
CONTRIBUTING with the new process.
Summary
Adopt a trunk-based deployment process for this repo:
mainbecomes the single source of truth that auto-deploys on every merge, and unreleased content is hidden by draft flags instead of long-lived staging/release branches.Goal
The aim is to create a simple deployment management process allow as minimal friction as possible when merging.
publicandmain, creates complication when mergingmainintopublic.Proposal: Continuous integration with
draftcontents.The basic flow:
Changes are deployed as soon as they land on
main.Truth branch:
mainUnreleased contents:
draft: truefrontmatter. Blocks rendering of the page in production build but still visible inpnpm dev. When releasing, create a new PR to flip todraft: false.<Draft>component (src/components/Draft.astro). Similar todraftfrontmatter, it blocks rendering the section in production build.All draft contents should be marked with a note on when to release them. This allow maintainer to keep track and release changes accordingly.
Proposed Process
For changes ready to be deployed:
For changes not yet ready (ex: waiting for a release):
main.draftof<Draft>on appropriate contentsExamples
1. Adding Client Side Caching Docs
mainwithdraft: truewith a commentFor release 2.5.2. Updating Ruby CSC Docs
<Draft>element with a commentFor release 1.2.3. Hot fix Ruby docs
Trade-offs
Todo
<Draft>element which should be simple.CONTRIBUTINGwith the new process.