In Part 1 we built an edge-native headless CMS on Workers with D1 + R2. Deploying SonicJS is not the hard part — doing it safely on every push is.

This post covers production bindings, secrets, migrate-before-deploy, and a GitHub Actions workflow that typechecks, migrates D1, deploys the Worker, and smoke-checks /health.

Prerequisites

A SonicJS project that already runs locally with wrangler dev

Cloudflare account + Wrangler logged in once (npx wrangler login)