Bscale Handbook

Deployment

How we deploy code to production safely and reliably.

This page is a placeholder and will be fleshed out in the future.

Deployment

We practice continuous deployment. Every merge to main triggers an automated pipeline that builds, tests, and ships to production.

Pipeline stages

  1. Build — compile TypeScript, bundle assets
  2. Test — unit tests, integration tests, type checking
  3. Preview — deploy to a preview environment for visual verification
  4. Production — automatic promotion after checks pass

Deployment schedule

  • Continuous — code merged to main deploys 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:

  1. Click Rollback in the deployment dashboard
  2. Post in #incidents with a brief description
  3. Investigate the root cause
  4. 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