Smithery Logo
MCPsSkillsDocsPricing
Login
Smithery Logo

Accelerating the Agent Economy

Resources

DocumentationPrivacy PolicySystem Status

Company

PricingAboutBlog

Connect

© 2026 Smithery. All rights reserved.

    sgcarstrends

    deployment-rollback

    sgcarstrends/deployment-rollback
    DevOps
    16
    1 installs

    About

    SKILL.md

    Install

    Install via Skills CLI

    or add to your agent
    • Claude Code
      Claude Code
    • Codex
      Codex
    • OpenClaw
      OpenClaw
    • Cursor
      Cursor
    • Amp
      Amp
    • GitHub Copilot
      GitHub Copilot
    • Gemini CLI
      Gemini CLI
    • Kilo Code
      Kilo Code
    • Junie
      Junie
    • Replit
      Replit
    • Windsurf
      Windsurf
    • Cline
      Cline
    • Continue
      Continue
    • OpenCode
      OpenCode
    • OpenHands
      OpenHands
    • Roo Code
      Roo Code
    • Augment
      Augment
    • Goose
      Goose
    • Trae
      Trae
    • Zencoder
      Zencoder
    • Antigravity
      Antigravity
    ├─
    ├─
    └─

    About

    Rollback failed deployments, restore previous versions, and handle deployment emergencies.

    SKILL.md

    Deployment Rollback Skill

    Quick Rollback via Vercel

    Using Vercel Dashboard

    1. Go to Vercel Dashboard → Project → Deployments
    2. Find the previous working deployment
    3. Click the three dots menu → "Promote to Production"

    Using Vercel CLI

    # List recent deployments
    vercel list
    
    # Promote a specific deployment to production
    vercel promote <deployment-url>
    
    # Or rollback to previous production deployment
    vercel rollback
    

    Database Rollback

    # Rollback last migration
    pnpm -F @sgcarstrends/database db:rollback
    
    # Rollback to specific migration
    pnpm -F @sgcarstrends/database db:rollback --to 20240115_initial
    
    # Restore from backup
    pg_dump $DATABASE_URL > backup-pre-deploy.sql  # Before deploy
    psql $DATABASE_URL < backup-pre-deploy.sql     # Restore if needed
    

    Git-Based Rollback

    # Revert specific commit
    git revert <commit-hash>
    git push origin main  # Triggers Vercel redeploy
    
    # Create rollback branch
    git checkout -b rollback/v1.1.0
    git reset --hard v1.1.0
    git push origin rollback/v1.1.0
    gh pr create --title "Rollback to v1.1.0" --body "Emergency rollback"
    

    Cache Invalidation

    # Revalidate Next.js cache
    curl -X POST "https://sgcarstrends.com/api/revalidate?tag=all&secret=$REVALIDATE_TOKEN"
    
    # Clear Redis cache
    redis-cli -h $REDIS_HOST FLUSHALL
    

    Health Checks During Rollback

    curl -f https://sgcarstrends.com || echo "Web unhealthy"
    psql $DATABASE_URL -c "SELECT 1" || echo "Database unreachable"
    

    Rollback Checklist

    Pre-Rollback:

    • Identify issue and severity
    • Determine scope (full/partial)
    • Check backup availability
    • Notify team

    During:

    • Rollback via Vercel dashboard or CLI
    • Rollback database if needed
    • Clear caches
    • Verify health checks
    • Run smoke tests

    Post:

    • Monitor error rates in Vercel dashboard
    • Verify functionality restored
    • Document what happened
    • Create postmortem

    Common Scenarios

    Critical Bug:

    vercel rollback
    curl https://sgcarstrends.com/api/health
    

    Database Migration Failure:

    pnpm -F @sgcarstrends/database db:rollback
    git revert HEAD
    git push origin main
    

    Troubleshooting

    Rollback deployment not working:

    # Force redeploy from known good commit
    git checkout v1.1.0
    vercel --prod
    

    Database schema mismatch:

    pnpm -F @sgcarstrends/database db:rollback
    # Or restore backup: psql $DATABASE_URL < backup-pre-deploy.sql
    

    Best Practices

    1. Always Backup: Create database backups before major deployments
    2. Test Rollback: Practice rollback procedures in preview deployments
    3. Feature Flags: Use for quick feature disabling without rollback
    4. Monitor Closely: Watch Vercel analytics during and after rollback
    5. Document Everything: Record what happened and why

    References

    • Vercel Rollbacks: https://vercel.com/docs/deployments/rollbacks
    • See monitoring skill for debugging issues
    Repository
    sgcarstrends/sgcarstrends
    Files