Dev Branch and QA Deployment
This document explains what the dev branch is used for and how QA deployment works on Cloudflare.
Purpose of the dev Branch
The dev branch is the cloud quality assurance environment:
- it validates frontend, backend, and database integration in a real remote setup
- it catches deployment/configuration issues before merging to
master
Branch Policy
master→ productiondev→ QAfeature/*→ no deployment (CI only)
Deployment Workflow
Deployment is handled by a single reusable workflow:
- file:
.github/workflows/deploy.yml - trigger path: called from the
dispatcherjob inci-cd.ymlon repository events - manual trigger:
workflow_dispatch
What Gets Deployed on dev
When dev is deployed, the workflow deploys:
QA Backend Worker
- worker name:
backend-preview - deploy command uses
--env=preview
- worker name:
QA Frontend
- Cloudflare Pages project:
frontend(deployed fromdevbranch) - frontend build variable:
VITE_BACKEND_URL=https://backend-preview.luca0patrignani.workers.dev
- Cloudflare Pages project:
QA D1 Database
- remote migrations applied to preview D1
- database name passed to migration step:
db-preview
What Gets Deployed on master
When master is deployed, the workflow deploys:
- backend
backend - frontend Pages project
frontend(production) - D1 migrations on production database
db
Required GitHub Secrets
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_IDCLOUDFLARE_D1_MIGRATION_RUNNER_SECRET(production D1 migrations)
Recommended Delivery Flow
- develop on feature branches
- merge to
devfor full cloud QA validation - merge to
masterfor production release
