How-to: Roll Back a Failed Deploy
We’ve all shipped a hotfix that backfired. This is the playbook we reach for when production needs a time machine.
Goal
Promote the last known-good Vercel deployment and redeploy any Supabase Edge Functions that might have shipped bad code.
Steps
- Roll back on Vercel.
- UI path: open the most recent successful deployment → “Promote to Production.”
- CLI path:
vercel rollback production
- Redeploy Edge Functions if ingestion was part of the bad release.
supabase functions deploy rss-fetch --project-ref $SUPABASE_PROJECT_REF --no-verify-jwt
supabase functions deploy twitter-fetch --project-ref $SUPABASE_PROJECT_REF --no-verify-jwt
- Smoke test production. Hit a critical endpoint and sanity-check the HUD.
curl -sS https://your-app.vercel.app/api/feed | head -c 200
Or load /hud and confirm stories render without console errors.
Pitfalls
- Log the incident right away. Future-you will thank present-you for timestamps and root-cause breadcrumbs.
- If the failure involved leaked env vars, rotate them before re-promoting production.
Time estimate
5–10 minutes. The longest part is usually writing the retro doc afterward.