CI/CD Pipeline
tripplan.ing uses GitHub Actions for continuous integration and deployment. A single workflow handles validation, building, and deployment of the unified Worker.
Workflows
| Workflow | File | Trigger | Purpose |
|---|---|---|---|
| App CI/CD | .github/workflows/apps-ci.yml | Push to main | Build and deploy the unified Worker |
| Docs Deploy | .github/workflows/docs-deploy.yml | Push to main (docs changes) | Build and deploy the docs site |
App CI/CD pipeline
The apps-ci.yml workflow runs these stages in order:
1. Validate
npm ci → Install all workspace dependencies
npm run check → TypeScript + Svelte type checking + boundary checks
npm test → Unit and integration testsIf any check fails, the pipeline stops. No deployment occurs.
2. Build
npm run build → Build the Worker with adapter-cloudflareThis produces the Worker bundle ready for Wrangler deployment.
3. Migrate
wrangler d1 migrations apply DB --remoteApplies any pending D1 migrations. Migrations run before deployment to ensure the database schema matches the new code.
4. Sync secrets
Pushes required secrets to the Worker:
wrangler secret put STRIPE_SECRET_KEY
wrangler secret put STRIPE_WEBHOOK_SECRET
wrangler secret put MAILGUN_API_KEY
wrangler secret put MAILGUN_DOMAINValues come from the GitHub Environment secrets.
5. Deploy
wrangler deployDeploys the Worker to Cloudflare. The Worker name and environment are determined by GitHub Environment variables.
Environment matrix
The workflow uses GitHub Environments to manage per-environment configuration:
| Environment | Worker name | Domain suffix | Trigger |
|---|---|---|---|
development | tripplan-dev | dev.tripplan.ing | Push to main |
production | tripplan | tripplan.ing | Push to main |
Both environments are deployed on push to main. You can configure branch protection rules or manual approval in GitHub Environment settings to gate production deployments.
Docs pipeline
The docs-deploy.yml workflow:
- Builds the VitePress site:
npm run docs:build - Deploys the static site to a separate Cloudflare Worker
Docs use their own worker name (e.g., tripplan-docs / tripplan-docs-dev).
Rollback
To roll back a bad deployment:
- Find the last known-good commit SHA
- Manually trigger
apps-ci.ymltargeting that SHA, or revert and push - The pipeline re-runs: validate → build → migrate → sync → deploy
WARNING
Database migrations are forward-only. If a migration added a column, rolling back the code won't remove the column. Ensure new code handles extra columns gracefully, or write a reverse migration.
Manual deployment
For emergency deploys outside CI:
# Build locally
npm run build
# Deploy with wrangler
cd apps/event-site
npx wrangler deployEnsure your local wrangler.toml has the correct resource IDs and your Cloudflare token has deploy permissions.
Retired workflows
These legacy workflows have been removed:
control-plane-deploy.yml— separate control plane appevent-deploy-from-manifest.yml— per-event deployments
All deployment now goes through the single apps-ci.yml workflow.
Related pages
- Cloudflare Workers — resource setup and go-live checklist
- Environment & Secrets — all required configuration
- Commands — build and check commands