Prepare isolated primary Worker cutover
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
name: Deploy primary production Worker candidate
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
candidate:
|
||||||
|
name: Build and deploy 3031023.xyz candidate
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
env:
|
||||||
|
SITE_KEY: www
|
||||||
|
DEPLOY_ENV: production
|
||||||
|
ASTRO_TELEMETRY_DISABLED: '1'
|
||||||
|
steps:
|
||||||
|
- name: Checkout source
|
||||||
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
- name: Use Node 22
|
||||||
|
uses: https://github.com/actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
- name: Install locked dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Validate and build production candidate
|
||||||
|
run: npm run build:site
|
||||||
|
- name: Verify production candidate output
|
||||||
|
run: npm run verify:build
|
||||||
|
- name: Deploy Worker without custom domains or routes
|
||||||
|
run: npx wrangler deploy --config wrangler/www.production.jsonc
|
||||||
|
env:
|
||||||
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||||
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
# 3031023.xyz Worker cutover runbook
|
||||||
|
|
||||||
|
## Scope and safety boundary
|
||||||
|
|
||||||
|
This runbook moves only the Happy Tails apex site to the separately deployed
|
||||||
|
static Worker `3031023-xyz`. It does not change the sign-up flow, n8n, the
|
||||||
|
onboarding Worker, blog hosting, or any other site.
|
||||||
|
|
||||||
|
The Pages project `3031023-xyz` remains available as the immediate rollback
|
||||||
|
target until the new apex deployment has been accepted.
|
||||||
|
|
||||||
|
Routine preview and candidate jobs never create, delete, or change DNS records,
|
||||||
|
custom domains, routes, or redirect rules. The candidate workflow only deploys
|
||||||
|
static assets to a distinct Worker.
|
||||||
|
|
||||||
|
## Pre-cutover record
|
||||||
|
|
||||||
|
- Existing rollback project: Cloudflare Pages `3031023-xyz`.
|
||||||
|
- Existing active custom domain: `3031023.xyz`.
|
||||||
|
- Existing Pages production deployment: `2fb1b659-5928-4470-bb04-ef4c9105b843`
|
||||||
|
from the `main` branch.
|
||||||
|
- Preview Worker: `3031023-xyz-www-preview`, with no custom domains or routes.
|
||||||
|
- Production candidate Worker: `3031023-xyz`, deployed only through the manual
|
||||||
|
`Deploy primary production Worker candidate` workflow.
|
||||||
|
|
||||||
|
## Cutover sequence (requires separate approval)
|
||||||
|
|
||||||
|
1. Confirm the candidate Worker deployment completed and record its version ID.
|
||||||
|
2. Verify its workers.dev URL for status, titles, static 404, mobile navigation,
|
||||||
|
sitemap, robots, and security headers.
|
||||||
|
3. In Cloudflare, remove `3031023.xyz` from the Pages project only after the
|
||||||
|
candidate is verified. Do not delete the Pages project or its deployment.
|
||||||
|
4. Attach `3031023.xyz` as the custom domain for the production Worker.
|
||||||
|
5. Attach `www.3031023.xyz` to the same Worker and create a Cloudflare Redirect
|
||||||
|
Rule for `www.3031023.xyz/*` to the matching `https://3031023.xyz/*` URL.
|
||||||
|
This preserves the apex canonical policy without adding hostname-routing
|
||||||
|
Worker code.
|
||||||
|
6. Re-run the production verification checklist and leave the Pages project in
|
||||||
|
place during the acceptance window.
|
||||||
|
|
||||||
|
## Rollback
|
||||||
|
|
||||||
|
1. Remove the custom domains from the production Worker and disable the `www`
|
||||||
|
redirect rule.
|
||||||
|
2. Restore `3031023.xyz` to the unchanged Pages project `3031023-xyz`.
|
||||||
|
3. Verify the known Pages deployment at its Pages URL and then at the apex.
|
||||||
|
|
||||||
|
The cutover operator records the actual Worker version ID, rule ID, time, and
|
||||||
|
verification results in the migration plan after acceptance.
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../node_modules/wrangler/config-schema.json",
|
||||||
|
"name": "3031023-xyz-www",
|
||||||
|
"compatibility_date": "2026-09-02",
|
||||||
|
"workers_dev": true,
|
||||||
|
"assets": { "directory": "../dist/www", "not_found_handling": "404-page" }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user