CI/CD Pipeline
Current Reality: Manual Deploy, Branch Previews
Section titled “Current Reality: Manual Deploy, Branch Previews”Convertella does not have a fully automated CI/CD pipeline yet. The current workflow relies on Cloudflare Pages branch previews and manual production deploys:
Push branch → Pages builds preview URL (automatic) → Manual testing ↓Merge to default → Manual production deploy (`npm run deploy:pages:prod`) ↓Manual production migration (`npm run db:migrate`)What Exists Today
Section titled “What Exists Today”| Step | Automation |
|---|---|
| Branch preview builds | ✅ Automatic (Cloudflare Pages) |
| Type checking | ❌ Manual (npx astro check) |
| Linting | ❌ Manual (npm run lint) |
| Unit tests | ❌ Manual (npm run test) |
| Production deploy | ❌ Manual (npm run deploy:pages:prod) |
| Database migrations | ❌ Manual (npm run db:migrate) |
| Smoke test | ❌ Manual (npm run test:smoke) |
Aspirational CI Pipeline (Future)
Section titled “Aspirational CI Pipeline (Future)”Once CI is set up via GitHub Actions, the pipeline will follow this flow:
flowchart LR Push[Push to branch] --> Preview[Pages preview build] Preview --> Test[Auto-run tests] Test --> Merge[Merge to default] Merge --> ProdDeploy[Manual production deploy]Planned CI Workflow (.github/workflows/ci.yml)
Section titled “Planned CI Workflow (.github/workflows/ci.yml)”- Checkout & Setup — Node 22, npm cache
- Lint —
npm run lint(ESLint) - Type Check —
npx astro check - Test —
npm run test(Vitest) - Build —
npm run build - Deploy (testing) — Automatic to Pages default branch
- Smoke Test —
npm run test:smoke
Planned Release Process
Section titled “Planned Release Process”- All tests pass on the default branch
- Create a release tag (
git tag v0.8.0 && git push origin v0.8.0) - Run production database migrations
- Deploy production (
npm run deploy:pages:prod) - Post-release verification in production preview
Rollback
Section titled “Rollback”Rollback means redeploying the previous production deployment via Cloudflare Pages dashboard. If a migration is not backward-compatible, the release is not rollback-safe — prefer additive schema changes.
Setting Up CI
Section titled “Setting Up CI”To move from manual to automated CI, you need:
- A
.github/workflows/ci.ymlfile in the platform repository - A Neon testing database with CI credentials set as GitHub Actions secrets
- Cloudflare API tokens for CI deployment (scoped to Pages write)
- A
wrangler.tomlCI environment or GitHub Actions Pages action