Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ Use internal locations for:

Changing content is different from changing serving behaviour.

Content-only changes normally need only a PR merge. Worker or serving-policy changes need additional review and, after merge, a manual Worker deployment. Treat these as serving changes:
Content-only changes normally need only a PR merge. Worker or serving-policy changes need additional review and, after merge, a manual Worker deployment. For Worker changes, follow the `worker/README.markdown` runbook: deploy preview, approve the required environment review, smoke test the workers.dev URL, deploy production, approve the required environment review, and smoke test `autonomi.com`. Treat these as serving changes:

- editing `worker/src/index.js`
- changing Wrangler config
Expand Down
28 changes: 25 additions & 3 deletions worker/README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,16 @@ Because this token can update production Cloudflare resources, both deploy workf

Preview deploys are manual only and run only from the `main` branch. They use the GitHub `production` environment approval gate because they use the same Cloudflare account credentials as production deploys.

From GitHub Actions, run **Deploy Worker Preview**. Locally, with Cloudflare credentials exported:
From GitHub Actions:

1. Open the repository's **Actions** tab.
2. Select **Deploy Worker Preview**.
3. Click **Run workflow** and run it from `main`.
4. When GitHub shows **Review deployments** for the `production` environment, approve it. Preview deploys currently need this approval because they use the same Cloudflare credentials as production, even though the preview Worker deploys only to workers.dev and does not attach the production route.
5. Wait for the workflow to complete.
6. Open the workflow run, open the **Deploy preview Worker** job, expand the final **Deploy preview Worker** step, and copy the workers.dev URL printed by Wrangler. It should look like `https://autonomi-md-proxy-preview.<cloudflare-workers-subdomain>.workers.dev`.

Locally, with Cloudflare credentials exported:

```sh
cd worker
Expand All @@ -64,7 +73,18 @@ This uses `wrangler.preview.jsonc`, deploys Worker name `autonomi-md-proxy-previ

Production deploys are manual only and run only from the `main` branch. Merging a PR must not deploy production.

From GitHub Actions, run **Deploy Worker Production**. The job uses the GitHub `production` environment, so configure and confirm required reviewers/protection there before use. Locally, with Cloudflare credentials exported:
From GitHub Actions:

1. Open the repository's **Actions** tab.
2. Select **Deploy Worker Production**.
3. Click **Run workflow** and run it from `main`.
4. When GitHub shows **Review deployments** for the `production` environment, approve it.
5. Wait for the workflow to complete.
6. Run the production smoke tests below against the routed `autonomi.com` URLs.

The job uses the GitHub `production` environment, so configure and confirm required reviewers/protection there before use.

Locally, with Cloudflare credentials exported:

```sh
cd worker
Expand All @@ -77,9 +97,11 @@ The deploy script asserts the production Worker name and route before deployment

## Smoke tests

After a preview deploy, use the workers.dev URL printed by Wrangler:
After a preview deploy, set `PREVIEW_URL` to the workers.dev URL copied from the **Deploy preview Worker** step log:

```sh
PREVIEW_URL="https://autonomi-md-proxy-preview.<cloudflare-workers-subdomain>.workers.dev"

curl -i "$PREVIEW_URL/llms.txt"
curl -i "$PREVIEW_URL/llms-full.txt"
curl -i "$PREVIEW_URL/overview.md"
Expand Down
Loading