feat(deploy): repeatable Cloudflare deploy script + make targets
deploy/cloudflare/deploy.sh (build → optional parallel R2 media sync → Pages deploy); 'make deploy' (frontend-only) / 'make deploy-media'. One-time setup stays documented in README. Guards against unauth + mis-keyed R2 uploads. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,22 @@ Plan: `docs/superpowers/plans/2026-06-30-cloudflare-static-publish.md`.
|
||||
This project is **exempt from the flotilla/PPE/§9 pipeline** (operator-set) — it
|
||||
deploys directly to Cloudflare. Safety/hygiene rules still hold.
|
||||
|
||||
## Repeatable deploy (after the one-time setup below)
|
||||
|
||||
Once the bucket/CORS/custom-domains + `wrangler login` exist (one-time, §1–3), every
|
||||
later deploy is one command (`deploy/cloudflare/deploy.sh`, or the Make targets):
|
||||
|
||||
```bash
|
||||
make deploy # frontend only: build + Pages deploy (fast — most deploys)
|
||||
make deploy-media # also re-sync all media to R2 (~2 min, parallel) — when media changed
|
||||
./deploy/cloudflare/deploy.sh --media-only # only the R2 media sync, skip Pages
|
||||
```
|
||||
|
||||
The script rebuilds `dist/`, (optionally) parallel-uploads `dist-media/` to R2, and
|
||||
deploys Pages — printing the live URL. It checks `wrangler` auth first and fails
|
||||
loudly. Override defaults via env: `BUCKET`, `PROJECT`, `MEDIA_BASE`, `APP_PATH`,
|
||||
`BRANCH`, `JOBS`. The sections below document the one-time setup the script assumes.
|
||||
|
||||
## Prerequisites (operator gestures — need Cloudflare auth)
|
||||
|
||||
`wrangler` is not installed in the dev box; the deploy runs from a machine with
|
||||
|
||||
Reference in New Issue
Block a user