Deployment
We practice continuous deployment. Every merge to main triggers an automated pipeline that builds, tests, and ships to production.
Pipeline stages
- Build — compile TypeScript, bundle assets
- Test — unit tests, integration tests, type checking
- Preview — deploy to a preview environment for visual verification
- Production — automatic promotion after checks pass
Deployment schedule
- Continuous — code merged to
maindeploys automatically - Feature flags — use flags for large features that aren't ready for all users
- Freeze periods — no deploys on Fridays after 4 PM or during incidents
Rollback procedure
If something goes wrong:
- Click Rollback in the deployment dashboard
- Post in
#incidentswith a brief description - Investigate the root cause
- Write a postmortem if the issue affected users
Monitoring
After deploying, keep an eye on:
- Error rates in Sentry
- Latency metrics in Grafana
- User-facing alerts in PagerDuty
// Example: Feature flag check
if (await featureFlag("new-dashboard")) {
return <NewDashboard />;
}
return <LegacyDashboard />;Best practices
- Deploy small changes frequently
- Monitor your deploys for at least 15 minutes
- Never deploy and disappear — stay available to respond