Git repo info and branch model
Monorepo
The main Docsy repository is effectively a monorepo containing the Docsy:
- Theme at the repo root
- Website in the
docsy.devdirectory. The website uses the Docsy theme, of course, with extra styling.
The main Docsy example site is Goldydocs, located in the Docsy example site repository.
Branch model
This repository’s branch model is as follows:
main: development branch for the next theme release and next site content.release: release and maintenance branch for the latest theme release.deploy/prodanddoc-rooted: publishing branches used by Netlify. These branches determine what is published (see the table below); they are not feature development branches.
The Goldydocs repo has the same model, except for doc-rooted which is not
used.
Published sites
Netlify publishes the following site variants. A variant’s version identity
(version and related params) comes from its config directory under
docsy.dev/config/:
| Site variant | Publishing branch | Version params |
|---|---|---|
| Latest release | deploy/prod | production/ |
| Next (dev) | main | _default/ |
| Doc-rooted (experimental) | doc-rooted | doc-rooted/ |
PR deploy previews build like the Next variant.
Tags
- Release tags (
vX.Y.Zandtheme/vX.Y.Z) mark official theme releases. - They never move: the
release-tag-integrityruleset blocks their update and deletion, with no bypass. - Only the designated releaser creates them, per the
release-tagsruleset.
Workflow
Overview
Theme and site work is done on
main.When ready to release:
- Release from
main(the usual case). - Patch on
release(whenmaincarries work that isn’t ready to release).
- Release from
Publish site updates: fast-forward
deploy/prodfromrelease.Netlify deploys from
deploy/prodanddoc-rooted.
Release from main
After
git fetch upstream, ifreleasehas commits thatmaindoesn’t (git log upstream/main..upstream/releaselists them, after a patch onrelease), restore the fast-forward path before the release-preparation PR merges.Once the release tag,
RELEASE_TAG(for example,v0.17.1), is pushed, fast-forwardreleaseto it:git fetch upstream --tags git switch -C release upstream/release git merge --ff-only RELEASE_TAG git push upstream release
Patch on release
Fix on main first whenever the fix applies there; a fix that doesn’t apply
there lands only on release. Then:
- Open a PR against
releasewith the fix (cherry-picked frommainwhen it landed there) and the release-preparation changes, and merge it. - Port the release-facing site updates (changelog, release blog post,
tdVersion.latest) onto a branch offmainand merge them by PR. A PR fromreleaseitself would carry the patch’s version stamps.
Branch sync and invariants
main: for its rules and the merge gates, see Merge requirements.
release:
- Follows
main: divergence lasts only from a patch onreleaseto the next release frommain. - Every official release tag is reachable from it.
- Stays at the latest release between releases: it is the base for patches.
- Never rewritten: no force pushes, no deletion (enforced by its ruleset).
- Receives content only through releases from
mainor patches onrelease. - Checks (including EasyCLA and workflow security analysis) run on PRs into
release; acting on them is the merging maintainer’s call. Merge with EasyCLA green, though: a miss onreleasecan’t be undone and blocks the next restore until the author signs.
deploy/prod: follows release as a pointer, never with commits of its own;
the published docs change only when release moves.
Why this model?
- Keeps theme releases predictable while
mainmoves quickly. - Keeps
releasea follower ofmain, so a patch never opens a second line of development. - Protects
releaseagainst rewriting without gating it: requiringmain’s PR-scoped gates there would refuse the fast-forward frommain, whose content already passed them. - Keeps
deploy/proda pointer, so publishing is a deliberate last step, separate from cutting the release.