---
name: deployment-procedures
description: ALWAYS use this when shipping, releasing, promoting environments, or planning a deployment flow where ordering and rollback safety matter.
Deployment Procedures
Selective Reading Rule
Start with:
references/senior-master-standard.md
references/usage-routing.md
references/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
Deployment principles and decision-making for safe production releases.
Learn to THINK, not memorize scripts.
â ï¸ How to Use This Skill
This skill teaches deployment principles, not bash scripts to copy.
- Every deployment is unique
- Understand the WHY behind each step
- Adapt procedures to your platform
1. Platform Selection
Decision Tree
What are you deploying?
│
├── Static site / JAMstack
│ └── Vercel, Netlify, Cloudflare Pages
│
├── Simple web app
│ ├── Managed → Railway, Render, Fly.io
│ └── Control → VPS + PM2/Docker
│
├── Microservices
│ └── Container orchestration
│
└── Serverless
└── Edge functions, Lambda
Each Platform Has Different Procedures
| Platform |
Deployment Method |
| Vercel/Netlify |
Git push, auto-deploy |
| Railway/Render |
Git push or CLI |
| VPS + PM2 |
SSH + manual steps |
| Docker |
Image push + orchestration |
| Kubernetes |
kubectl apply |
2. Pre-Deployment Principles
The 4 Verification Categories
| Category |
What to Check |
| Code Quality |
Tests passing, linting clean, reviewed |
| Build |
Production build works, no warnings |
| Environment |
Env vars set, secrets current |
| Safety |
Backup done, rollback plan ready |
Pre-Deployment Checklist
3. Deployment Workflow Principles
The 5-Phase Process
1. PREPARE
└── Verify code, build, env vars
2. BACKUP
└── Save current state before changing
3. DEPLOY
└── Execute with monitoring open
4. VERIFY
└── Health check, logs, key flows
5. CONFIRM or ROLLBACK
└── All good? Confirm. Issues? Rollback.
Phase Principles
| Phase |
Principle |
| Prepare |
Never deploy untested code |
| Backup |
Can't rollback without backup |
| Deploy |
Watch it happen, don't walk away |
| Verify |
Trust but verify |
| Confirm |
Have rollback trigger ready |
4. Post-Deployment Verification
What to Verify
| Check |
Why |
| Health endpoint |
Service is running |
| Error logs |
No new errors |
| Key user flows |
Critical features work |
| Performance |
Response times acceptable |
Verification Window
- First 5 minutes: Active monitoring
- 15 minutes: Confirm stable
- 1 hour: Final verification
- Next day: Review metrics
5. Rollback Principles
When to Rollback
| Symptom |
Action |
| Service down |
Rollback immediately |
| Critical errors |
Rollback |
| Performance >50% degraded |
Consider rollback |
| Minor issues |
Fix forward if quick |
Rollback Strategy by Platform
| Platform |
Rollback Method |
| Vercel/Netlify |
Redeploy previous commit |
| Railway/Render |
Rollback in dashboard |
| VPS + PM2 |
Restore backup, restart |
| Docker |
Previous image tag |
| K8s |
kubectl rollout undo |
Rollback Principles
- Speed over perfection: Rollback first, debug later
- Don't compound errors: One rollback, not multiple changes
- Communicate: Tell team what happened
- Post-mortem: Understand why after stable
6. Zero-Downtime Deployment
Strategies
| Strategy |
How It Works |
| Rolling |
Replace instances one by one |
| Blue-Green |
Switch traffic between environments |
| Canary |
Gradual traffic shift |
Selection Principles
| Scenario |
Strategy |
| Standard release |
Rolling |
| High-risk change |
Blue-green (easy rollback) |
| Need validation |
Canary (test with real traffic) |
7. Emergency Procedures
Service Down Priority
- Assess: What's the symptom?
- Quick fix: Restart if unclear
- Rollback: If restart doesn't help
- Investigate: After stable
Investigation Order
| Check |
Common Issues |
| Logs |
Errors, exceptions |
| Resources |
Disk full, memory |
| Network |
DNS, firewall |
| Dependencies |
Database, APIs |
8. Anti-Patterns
| ⌠Don't |
✅ Do |
| Deploy on Friday |
Deploy early in week |
| Rush deployment |
Follow the process |
| Skip staging |
Always test first |
| Deploy without backup |
Backup before deploy |
| Walk away after deploy |
Monitor for 15+ min |
| Multiple changes at once |
One change at a time |
9. Decision Checklist
Before deploying:
10. Best Practices
- Small, frequent deploys over big releases
- Feature flags for risky changes
- Automate repetitive steps
- Document every deployment
- Review what went wrong after issues
- Test rollback before you need it
Remember: Every deployment is a risk. Minimize risk through preparation, not speed.
1---2name: deployment-procedures3description: ---4---5---6name: deployment-procedures7description: ALWAYS use this when shipping, releasing, promoting environments, or planning a deployment flow where ordering and rollback safety matter.8---910# Deployment Procedures1112## Selective Reading Rule1314Start with:1516- `references/senior-master-standard.md`17- `references/usage-routing.md`18- `references/quality-checklist.md`1920Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.2122> Deployment principles and decision-making for safe production releases.23> **Learn to THINK, not memorize scripts.**2425---2627## â ï¸ How to Use This Skill2829This skill teaches **deployment principles**, not bash scripts to copy.3031- Every deployment is unique32- Understand the WHY behind each step33- Adapt procedures to your platform3435---3637## 1. Platform Selection3839### Decision Tree4041```42What are you deploying?43│44├── Static site / JAMstack45│ └── Vercel, Netlify, Cloudflare Pages46│47├── Simple web app48│ ├── Managed → Railway, Render, Fly.io49│ └── Control → VPS + PM2/Docker50│51├── Microservices52│ └── Container orchestration53│54└── Serverless55 └── Edge functions, Lambda56```5758### Each Platform Has Different Procedures5960| Platform | Deployment Method |61|----------|------------------|62| **Vercel/Netlify** | Git push, auto-deploy |63| **Railway/Render** | Git push or CLI |64| **VPS + PM2** | SSH + manual steps |65| **Docker** | Image push + orchestration |66| **Kubernetes** | kubectl apply |6768---6970## 2. Pre-Deployment Principles7172### The 4 Verification Categories7374| Category | What to Check |75|----------|--------------|76| **Code Quality** | Tests passing, linting clean, reviewed |77| **Build** | Production build works, no warnings |78| **Environment** | Env vars set, secrets current |79| **Safety** | Backup done, rollback plan ready |8081### Pre-Deployment Checklist8283- [ ] All tests passing84- [ ] Code reviewed and approved85- [ ] Production build successful86- [ ] Environment variables verified87- [ ] Database migrations ready (if any)88- [ ] Rollback plan documented89- [ ] Team notified90- [ ] Monitoring ready9192---9394## 3. Deployment Workflow Principles9596### The 5-Phase Process9798```991. PREPARE100 └── Verify code, build, env vars1011022. BACKUP103 └── Save current state before changing1041053. DEPLOY106 └── Execute with monitoring open1071084. VERIFY109 └── Health check, logs, key flows1101115. CONFIRM or ROLLBACK112 └── All good? Confirm. Issues? Rollback.113```114115### Phase Principles116117| Phase | Principle |118|-------|-----------|119| **Prepare** | Never deploy untested code |120| **Backup** | Can't rollback without backup |121| **Deploy** | Watch it happen, don't walk away |122| **Verify** | Trust but verify |123| **Confirm** | Have rollback trigger ready |124125---126127## 4. Post-Deployment Verification128129### What to Verify130131| Check | Why |132|-------|-----|133| **Health endpoint** | Service is running |134| **Error logs** | No new errors |135| **Key user flows** | Critical features work |136| **Performance** | Response times acceptable |137138### Verification Window139140- **First 5 minutes**: Active monitoring141- **15 minutes**: Confirm stable142- **1 hour**: Final verification143- **Next day**: Review metrics144145---146147## 5. Rollback Principles148149### When to Rollback150151| Symptom | Action |152|---------|--------|153| Service down | Rollback immediately |154| Critical errors | Rollback |155| Performance >50% degraded | Consider rollback |156| Minor issues | Fix forward if quick |157158### Rollback Strategy by Platform159160| Platform | Rollback Method |161|----------|----------------|162| **Vercel/Netlify** | Redeploy previous commit |163| **Railway/Render** | Rollback in dashboard |164| **VPS + PM2** | Restore backup, restart |165| **Docker** | Previous image tag |166| **K8s** | kubectl rollout undo |167168### Rollback Principles1691701. **Speed over perfection**: Rollback first, debug later1712. **Don't compound errors**: One rollback, not multiple changes1723. **Communicate**: Tell team what happened1734. **Post-mortem**: Understand why after stable174175---176177## 6. Zero-Downtime Deployment178179### Strategies180181| Strategy | How It Works |182|----------|--------------|183| **Rolling** | Replace instances one by one |184| **Blue-Green** | Switch traffic between environments |185| **Canary** | Gradual traffic shift |186187### Selection Principles188189| Scenario | Strategy |190|----------|----------|191| Standard release | Rolling |192| High-risk change | Blue-green (easy rollback) |193| Need validation | Canary (test with real traffic) |194195---196197## 7. Emergency Procedures198199### Service Down Priority2002011. **Assess**: What's the symptom?2022. **Quick fix**: Restart if unclear2033. **Rollback**: If restart doesn't help2044. **Investigate**: After stable205206### Investigation Order207208| Check | Common Issues |209|-------|--------------|210| **Logs** | Errors, exceptions |211| **Resources** | Disk full, memory |212| **Network** | DNS, firewall |213| **Dependencies** | Database, APIs |214215---216217## 8. Anti-Patterns218219| ⌠Don't | ✅ Do |220|----------|-------|221| Deploy on Friday | Deploy early in week |222| Rush deployment | Follow the process |223| Skip staging | Always test first |224| Deploy without backup | Backup before deploy |225| Walk away after deploy | Monitor for 15+ min |226| Multiple changes at once | One change at a time |227228---229230## 9. Decision Checklist231232Before deploying:233234- [ ] **Platform-appropriate procedure?**235- [ ] **Backup strategy ready?**236- [ ] **Rollback plan documented?**237- [ ] **Monitoring configured?**238- [ ] **Team notified?**239- [ ] **Time to monitor after?**240241---242243## 10. Best Practices2442451. **Small, frequent deploys** over big releases2462. **Feature flags** for risky changes2473. **Automate** repetitive steps2484. **Document** every deployment2495. **Review** what went wrong after issues2506. **Test rollback** before you need it251252---253254> **Remember:** Every deployment is a risk. Minimize risk through preparation, not speed.