Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ This will let the Astro docs team know you have some changes to propose. At this

Please include a clear title. The description will be pre-filled with questions that you can answer by editing right in the text field.

Every pull request generates a preview of the docs site, including your proposed changes, using **Netlify** for anyone to see.
Every pull request generates a preview of the docs site, including your proposed changes, using **Cloudflare Workers** for anyone to see.

Use the **Deploy Preview** link in your pull request to review and share your changes.
Use the **Preview deployment** link in your pull request to review and share your changes.

The docs site will be automatically updated whenever pull requests are merged.

Expand Down Expand Up @@ -204,6 +204,28 @@ In the terminal on your computer:
2. Click <kbd>Install</kbd>
3. Follow the instructions to select your fork

## Creating a Version Branch

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:

### 1. On the new version branch

After branching from `main`, update these files:

- **`wrangler.jsonc`** — Change the `name` field to match the version (e.g. `"name": "docs-v7"`).
- **`astro.config.ts`** — Change the `site` URL to the versioned subdomain (e.g. `'https://v7.docs.astro.build/'`).

### 2. On `main`

Update `.github/workflows/deploy.yml` to include the new version branch:

- Add the branch name to the `push.branches` list (e.g. `[main, v4, v5, v6, v7]`).
- Add a corresponding `github.ref == 'refs/heads/v7'` condition to the Deploy step's `if` block.

### 3. In the Cloudflare dashboard

- 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`).
Comment on lines +225 to +227

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Unless this is useful for you (or anyone having access to Cloudflare), I'm not sure we need this? I mean we didn't have that for Netlify and people with access knew how to do it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just thought it would be better to document somewhere rather than it be tribal knowledge that you have to ask about on Discord (mostly just didn't want to be the only one who knew how). But if you think it doesn't belong here, happy to remove.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just wasn't sure if it was intentional because unlike that of withastro/astro, this one mostly contains things for every contributor (ie. not maintainer specific guidance). So, no issue here, I don't mind keeping that here!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is not like a secret or anything, but just documentation for those with access. Would rather keep it, thanks!


## Next Steps

- [Read the docs](https://docs.astro.build/)
Expand Down
Loading