You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+24-2Lines changed: 24 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -168,9 +168,9 @@ This will let the Astro docs team know you have some changes to propose. At this
168
168
169
169
Please include a clear title. The description will be pre-filled with questions that you can answer by editing right in the text field.
170
170
171
-
Every pull request generates a preview of the docs site, including your proposed changes, using **Netlify** for anyone to see.
171
+
Every pull request generates a preview of the docs site, including your proposed changes, using **Cloudflare Workers** for anyone to see.
172
172
173
-
Use the **Deploy Preview** link in your pull request to review and share your changes.
173
+
Use the **Preview deployment** link in your pull request to review and share your changes.
174
174
175
175
The docs site will be automatically updated whenever pull requests are merged.
176
176
@@ -204,6 +204,28 @@ In the terminal on your computer:
204
204
2. Click <kbd>Install</kbd>
205
205
3. Follow the instructions to select your fork
206
206
207
+
## Creating a Version Branch
208
+
209
+
When a new major version of Astro is released, the current `main` branch becomes a version branch (e.g. `v7`) to preserve the docs for that version. Since `main` already has the Cloudflare Workers deployment infrastructure, only a few changes are needed:
210
+
211
+
### 1. On the new version branch
212
+
213
+
After branching from `main`, update these files:
214
+
215
+
-**`wrangler.jsonc`** — Change the `name` field to match the version (e.g. `"name": "docs-v7"`).
216
+
-**`astro.config.ts`** — Change the `site` URL to the versioned subdomain (e.g. `'https://v7.docs.astro.build/'`).
217
+
218
+
### 2. On `main`
219
+
220
+
Update `.github/workflows/deploy.yml` to include the new version branch:
221
+
222
+
- Add the branch name to the `push.branches` list (e.g. `[main, v4, v5, v6, v7]`).
223
+
- Add a corresponding `github.ref == 'refs/heads/v7'` condition to the Deploy step's `if` block.
224
+
225
+
### 3. In the Cloudflare dashboard
226
+
227
+
- After the first successful deploy, go to the Worker's settings (e.g. `docs-v7`) -> **Domains & Routes** and add the custom domain (e.g. `v7.docs.astro.build`).
0 commit comments