Skip to content

Commit 2388a5f

Browse files
committed
Clarify release process and branch model
1 parent 38978ff commit 2388a5f

File tree

5 files changed

+98
-44
lines changed

5 files changed

+98
-44
lines changed

docsy.dev/config/_default/params.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# status: archived # Then fetch include
88

99
version: &docsyVersion 0.14.3-dev
10-
tdBuildId: 012-over-main-bb43d873
10+
tdBuildId: 013-over-main-38978ffc
1111
versionLatest: &versionLatest v0.14.2
1212
version_menu: *docsyVersion
1313
version_menu_pagelinks: true

docsy.dev/content/en/project/about/maintainer-notes.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,20 @@ accordingly.
5757
```
5858

5959
Both forms update the `version` related fields in [package.json][] and
60-
[docsy.dev/hugo.yaml][].
60+
[docsy.dev/config][] files.
6161

6262
6. <a id="ci-test-step">Run `npm run ci:test`</a>, which runs `ci:prepare` and
6363
more to ensure that, e.g., vendor assets and [go.mod] dependencies are
6464
up-to-date, etc.
6565

6666
7. **Submit a PR with your changes**.
67+
- Set the `BASE` variable to the target branch: `main` if this is a stable
68+
release, and `release` for patch releases.
69+
70+
```sh
71+
BASE=main
72+
```
73+
6774
- Commit any changes accumulated from the previous steps using this title:
6875

6976
```text
@@ -76,6 +83,7 @@ accordingly.
7683
```sh
7784
export SKIP_VERSION_CHECK=1
7885
gh pr create --web --title "Release $VERSION preparation" \
86+
--base $BASE \
7987
--body "- Contributes to #<ADD-RELEASE-PREP-ISSUE-HERE>"
8088
```
8189

@@ -94,12 +102,12 @@ accordingly.
94102

95103
9. **Get PR approved and merged**.
96104

97-
10. **Pull in `main`** to get the last PR.
105+
10. **Pull the PR** to get the last changes.
98106

99-
11. **Test Docsy from main**, from the [docsy-example][] repository for example.
107+
11. **Test Docsy** from [docsy-example][], for example.
100108

101109
12. **Ensure** that you're:
102-
- On the default branch, `main`
110+
- On the target `$BASE` branch
103111
- At the commit that you want to tag as {{% param version %}}
104112
105113
13. **Create the new tag** for {{% param version %}}.
@@ -215,24 +223,28 @@ accordingly.
215223
216224
</details>
217225
218-
15. Fast-forward the [deploy/prod][] branch so that it points to the same commit
219-
as `main`:
226+
15. Update the [deploy/prod][] branch from `$BASE`.
227+
228+
For stable releases from `main`, use:
220229
221230
```sh
222-
git checkout deploy/prod && \
231+
git checkout deploy/prod
223232
git merge --ff-only main
224233
git push-all-remotes deploy/prod
225234
```
226235
227-
This will trigger a production deploy of the website.
236+
For patch releases from `release`, selectively merge from `$BASE`.
237+
238+
The branch update will trigger a production deploy of the website.
228239
229240
16. Wait for the production deploy to complete and check that [docsy.dev][] has
230241
been updated to the new release.
231242
232243
17. **[Draft a new release][]** using GitHub web; fill in the fields as follows:
233-
- **Target**: select the `deploy/prod` branch.
244+
- Visit [tags][] to find the new release tag v{{% param version %}}.
234245
235-
- **Tag**: select new release tag v{{% param version %}}
246+
- Select Create a new release from the v{{% param version %}} tag dropdown
247+
menu
236248
237249
- **Release title**: use the release version.
238250
@@ -332,7 +344,8 @@ before any further changes are merged into the `main` branch:
332344
[deploy/prod]: <{{% param github_repo %}}/tree/deploy/prod>
333345
[docsy-example]: <{{% param github_repo %}}-example>
334346
[docsy.dev]: <{{% _param baseURL %}}>
335-
[docsy.dev/hugo.yaml]: <{{% param github_repo %}}/blob/main/docsy.dev/hugo.yaml>
347+
[docsy.dev/config]: <{{% param github_repo %}}/blob/main/docsy.dev/config/>
336348
[Draft a new release]: <{{% param github_repo %}}/releases/new>
337349
[go.mod]: <{{% param github_repo %}}/blob/main/go.mod>
338350
[package.json]: <{{% param github_repo %}}/blob/main/package.json>
351+
[tags]: <{{% param github_repo %}}/tags>

docsy.dev/content/en/project/build/git-repo.md

Lines changed: 68 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Git repository information
3-
linkTitle: Git repos
2+
title: Git repo info and branch model
3+
linkTitle: Git repos and branches
44
cSpell:ignore: hotfixes
55
---
66

@@ -13,54 +13,91 @@ Docsy:
1313
- **Website** in the `docsy.dev` directory. The website uses the Docsy theme, of
1414
course, with extra styling.
1515

16+
These two projects are kept in sync at release points, but they may diverge
17+
between releases, usually to allow the website to ship doc content and UX
18+
improvements without forcing a theme release.
19+
1620
The main Docsy example site is [Goldydocs], located in the [Docsy example site
1721
repository][].
1822

1923
## Branch model
2024

21-
Both the Docsy and Goldydocs repositories use the same branch model:
25+
This repository's branch model is as follows:
2226

23-
- `main`: development branch
24-
- All feature work and documentation updates land here first.
25-
- Source of the _leading-edge_ theme and website versions.
27+
- `main`: development branch for the next theme release and next site content.
28+
- `release`: release and maintenance branch for the current stable theme version
29+
- Publishing branches used by Netlify:
30+
- `deploy/prod`: production site for the current stable release docs.
31+
- `doc-rooted`: production branch for the doc-rooted site variant.
32+
- These branches determine what is published. They are not feature development
33+
branches.
2634

27-
- `deploy/*`: publishing branches used by Netlify
28-
- `deploy/prod`: production site
29-
- `deploy/docs-only`: docs-only site variant
30-
- These branches determine what is published. They are not development
31-
branches. Changes must originate from `main` and are typically
32-
fast-forwarded here.
35+
The Goldydocs repo has the same model, except for `doc-rooted` which is not
36+
used.
3337

3438
### Tags
3539

36-
- Tags are used for **official theme releases**
37-
- Tags are attached to `main` commits, which are shared by `deploy/prod` since
38-
the two branches sync on releases.
40+
- Tags are used for **official theme releases**.
41+
- Tags are created from `release`.
42+
43+
### Workflow
44+
45+
#### General workflow
46+
47+
1. Theme and site work is done on `main`.
48+
49+
2. When ready to release:
50+
- Stable release: fast-forward merge from `main` to `release`.
51+
- Patch release: create and merge a release PR from `main` to `release`,
52+
e.g., by cherry-picking relevant commits.
53+
54+
3. Publish site updates:
55+
- Fast-forward `deploy/prod` from `main` when possible.
56+
- Otherwise (usually because of `release` was patched),
57+
58+
- Bring release-facing site updates (for example changelog and release blog
59+
updates) onto `main` from `release`.
60+
61+
4. Netlify deploys from `deploy/prod` and `doc-rooted`.
62+
63+
This keeps theme releases and site deploys coordinated, but not tightly coupled.
64+
65+
#### Patch release workflow
66+
67+
For patches to the theme or website, generally prefer making the changes to
68+
`main` first, though you can apply them to `release` then merge back to `main`.
69+
Assuming the former, the patch-release workflow is as follows:
3970

40-
### Release flow
71+
1. Cherry-pick relevant commits from `main` to `release`.
72+
2. Create a and merge a release PR from `main` to `release`.
73+
3. Bring release-facing site updates (for example changelog and release blog
74+
updates) back onto `main` from `release`.
75+
4. Update `deploy/prod` from `main` by fast-forward merging if possible, if not
76+
then selectively bring in release relevant changes.
4177

42-
1. Work merges into `main`.
43-
2. At release:
44-
- Tag the release commit on `main`.
45-
- Fast-forward `deploy/prod` to that same commit.
46-
3. Netlify deploys from `deploy/prod`.
78+
### Branch sync and invariants
4779

48-
This keeps history mostly linear.
80+
`release`:
4981

50-
### Hotfixes (rare)
82+
- The theme release and maintenance branch.
83+
- Theme tags come from this branch.
84+
- Flow is usually from `main` to `release` via fast-forward merge, when
85+
possible, cherry-picking otherwise (on patch releases)
86+
- Periodically, after a patch release, record branch ancestry without taking
87+
content by periodically running `git merge -s ours release` on `main`.
5188

52-
- If a fix lands on `deploy/prod`, it must be forward-merged or cherry-picked to
53-
`main`.
54-
- Next promotion fast-forwards `deploy/prod` to `main` again.
89+
`deploy/prod`:
5590

56-
Invariant: `deploy/prod` should converge back to `main` ASAP.
91+
- Reflects the current release docs baseline
92+
- Can include site-only improvements that are compatible with the current
93+
release
5794

5895
## Why this model?
5996

60-
- Preserves a clean, mostly linear history.
61-
- Allows website production deploys on release commits (and a rare hotfix).
62-
- Keeps `main` free for ongoing theme + site development.
63-
- Maintains clear, immutable release points for theme consumers via tags.
97+
- Keeps stable theme releases predictable while `main` moves quickly.
98+
- Lets the website ship docs UX improvements without forcing a theme release.
99+
- Preserves clear release tags for theme consumers.
100+
- Keeps branch responsibilities explicit for a small maintainer team.
64101

65102
[Goldydocs]: <{{% param example_site_url %}}>
66103
[Docsy example site repository]: <{{% param github_repo %}}-example>

docsy.dev/static/refcache.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,10 @@
763763
"StatusCode": 206,
764764
"LastSeen": "2026-02-11T11:19:01.944819-05:00"
765765
},
766+
"https://github.com/google/docsy/blob/main/docsy.dev/config/": {
767+
"StatusCode": 206,
768+
"LastSeen": "2026-02-18T03:26:03.119227-05:00"
769+
},
766770
"https://github.com/google/docsy/blob/main/docsy.dev/content/en/_index.md": {
767771
"StatusCode": 206,
768772
"LastSeen": "2026-02-11T11:18:49.8453-05:00"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "docsy",
3-
"version": "0.14.3-dev+012-over-main-bb43d873",
3+
"version": "0.14.3-dev+013-over-main-38978ffc",
44
"repository": "github:google/docsy",
55
"homepage": "https://www.docsy.dev",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)