The Wall of Red
I stared at my Vercel dashboard this morning and saw something painful: every single deployment — Error. A wall of red dots. And when I tried to create a new deployment manually, Vercel hit me with:
Resource is limited - try again in 25 minutes (more than 100, code: “api-deployments-free-per-day”).
100 deployments in one day. On the free tier. For copypastelearn.com.
How did I get here? Let me walk you through it so you don’t make the same mistakes.
What Triggers a Vercel Deployment
Every push to any branch in your connected GitHub repo triggers a deployment. That includes:
- Pushes to
main(production) - Pushes to feature branches (preview deployments)
- Pull request updates
- Even force-pushes and rebases
I was debugging multiple issues across several branches:
fix/force-dynamic-all-db-pages → 4b75df2
001-mvp-platform → 03236e7
fix/dashboard-dynamic → multiple commits
fix/sitemap-sort-order → adb5a7cEach fix-commit-push cycle burned a deployment. With 6+ branches and rapid iteration, I hit 100 before lunch.
The Math of Deployment Burn
Branches active: 6
Average commits per branch: 8-10
Rebases/force-pushes: ~15
Vercel preview deploys: 1 per push per branch
Total: 6 × 10 + 15 = ~75 deploys
Plus main branch merges: ~25
Grand total: ~100 deploys 💥How to Avoid This
1. Disable Auto-Deploy on Non-Production Branches
In your vercel.json:
{
"git": {
"deploymentEnabled": {
"main": true,
"001-mvp-platform": false,
"fix/*": false
}
}
}Or in the Vercel dashboard: Settings → Git → Ignored Build Step. Add a script that skips builds on branches you don’t need previews for.
2. Use the Ignored Build Step
Create a script that Vercel runs before building. If it exits with 0, the build proceeds. If it exits with 1, it’s skipped:
#!/bin/bash
# vercel-ignore-build.sh
# Only build on main or staging
if [[ "$VERCEL_GIT_COMMIT_REF" == "main" || "$VERCEL_GIT_COMMIT_REF" == "staging" ]]; then
echo "✅ Building: $VERCEL_GIT_COMMIT_REF"
exit 1 # Proceed with build
fi
echo "🚫 Skipping: $VERCEL_GIT_COMMIT_REF"
exit 0 # Skip buildSet this in Settings → General → Build & Development Settings → Ignored Build Step.
3. Batch Your Commits
Instead of push-per-fix:
# Don't do this
git commit -m "fix typo" && git push
git commit -m "fix another typo" && git push
git commit -m "actually fix it" && git push
# = 3 deployments
# Do this instead
git commit -m "fix typo"
git commit -m "fix another typo"
git commit -m "actually fix it"
git push
# = 1 deployment4. Develop Locally First
This seems obvious, but when you’re debugging Prisma/auth issues that only manifest on Vercel’s serverless runtime, you’re tempted to “just push and see.” Resist. Use vercel dev locally:
# Run Vercel's serverless environment locally
npx vercel devIt’s not perfect parity, but it catches 80% of issues without burning deployments.
5. Consider Vercel Pro (If This Happens Often)
Vercel Pro gives you 6,000 deployments/month ($20/month). If you’re consistently hitting free tier limits, the math works out: your time is worth more than $20.
The Actual Bugs I Was Fixing
For context, here’s what drove the deployment frenzy on copypastelearn.com:
Prisma/auth pages need
force-dynamic— statically prerendered pages that use database queries crash at build time. Every auth-protected page needsexport const dynamic = 'force-dynamic'.Sitemap using wrong sort field —
sortOrdervsorderfor lessons. One commit, one push, one deployment to verify.Stripe client lazy-init — the Stripe client was initializing at import time, crashing builds when
STRIPE_SECRET_KEYwasn’t available during static generation.
Each fix was small. But each required a Vercel deployment to verify because the issues were specific to the serverless environment.
Lessons Learned
- Free tier limits are real. 100 deployments/day sounds generous until you’re debugging in production.
- Every branch push costs a deployment. Disable preview deployments on branches you don’t need.
- Batch your commits, push once. Your future self will thank you.
vercel devis your friend. Use it before pushing.- The 25-minute cooldown is frustrating but gives you time to batch more fixes together. Silver lining.
The wall of red errors on my dashboard was a learning moment. Now my deployment hygiene is much better — and copypastelearn.com is running smoothly.
# Current deployment count today: 3
# Branches with auto-deploy: main only
# Feeling: much calmer