GitHub Actions Deployment
The workflow is .github/workflows/deploy-worker.yml, displayed as 00 Deploy Worker in newer versions (previously Deploy Worker). For a first deployment, follow Getting Started.
Run a Deployment
- Open
Actions → 00 Deploy Workerin your fork. - Click
Run workflowand select the deployment branch. - Leave
apply_encryption_keyringandrotate_encryption_keyunchecked for a normal deployment. - Check the final Worker URL and deployment status.
Pushes to master or main also trigger deployment when frontend, backend, shared code, tests, or deployment configuration changes. For documentation-only changes, run it manually. Automatic updates dispatch deployment after merging a release.
Deployment Credentials
Add these under Settings → Secrets and variables → Actions → Secrets:
| Repository Secret | Purpose |
|---|---|
CLOUDFLARE_API_TOKEN | Cloudflare API access; see token setup |
CLOUDFLARE_ACCOUNT_ID | Target Cloudflare account |
EDGECHAT_ADMIN_USERNAME | Initial administrator username |
EDGECHAT_ADMIN_PASSWORD | Initial administrator password |
Provide administrator credentials as a pair. Updates can omit them when an active super administrator exists. Initialization creates missing accounts only; see Administrator Setup for setup and recovery.
Workflow Steps
- Install dependencies, run tests, and build the frontend.
- Reuse or create D1, session KV, and R2; generate
wrangler.ci.toml. - Apply the full schema for a new database or pending migrations for an existing one, then verify structure.
- Initialize an administrator from Secrets and check for an active super administrator and encryption keys.
- Deploy the Worker and inject TURN Secrets if configured.
Steps run in order. Expand the failed step to inspect its log.
| Task | Guide |
|---|---|
| Retention, upload limits, and site origins | Site Configuration |
| Attachments, avatars, and enabling R2 | Attachments and Storage |
| Voice relay Secrets | Voice Calls and TURN |
| Database upgrades and migration failures | D1 Migrations |
| Encryption key rotation and backups | Encryption Keys |
| Post-deployment checks | Installation and Version Checks |
Resource Names
Defaults reuse the cfchat Worker, cfchat-db database, and cfchat-files bucket by name.
Session KV defaults to cfchat-sessions. If an existing site uses a different namespace title, set the Repository Variable EDGECHAT_KV_NAMESPACE_TITLE to that title to keep the same session store.
Other Workflows
The separate deploy-demo.yml uses DEMO_CLOUDFLARE_ACCOUNT_ID and DEMO_CLOUDFLARE_API_TOKEN without touching production databases. See Frontend-only Demo.
Android workflows run separately from the Worker. Build and signing instructions are in the client guide.
Retention settings moved to Site Configuration. Manual database steps are in D1 Migrations.