Operations

Deployment Prerequisites

Create Cloudflare resources, secrets, and domains in the right order before the first deploy.

Deployment Prerequisites

Do not deploy this starter until project-specific infrastructure exists.

Cloudflare resources

  • Set the project names, real domains, and Cloudflare account ID in project.json, then run pnpm run generate.
  • Create the stage and production D1 databases, KV namespaces, and R2 buckets named by the generated configuration.
  • Put their IDs in project.json and run pnpm run generate.

Secrets

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • OIDC_PRIVATE_KEY
  • OIDC_PUBLIC_KEY
  • OIDC_KEY_ID

Import the OIDC keys with scripts/auth/import-oidc-keys.sh <environment> <private-key> <public-key> <key-id>.

GitHub Actions

  • Add CLOUDFLARE_API_TOKEN as a repo or environment secret.
  • Configure stage and production environments if you use protected deployments.
  • Decide whether deploy jobs should run on GitHub-hosted or self-hosted runners.

Before first production deploy

  • Set the real domains and Cloudflare IDs in project.json, then run pnpm run generate.
  • Run local verification and a stage deploy first.