Deploy to Production
Pre-flight Checks
- •Run
npm testorpytest- all tests must pass - •Run
npm run buildor equivalent - •Check for uncommitted changes with
git status - •Verify no secrets in staged files
Deployment Steps
- •Create release branch:
git checkout -b release/$(Get-Date -Format 'yyyyMMdd') - •Build production bundle
- •Run security scan if available (
npm audit/safety check) - •Deploy to staging first
- •Run smoke tests against staging
- •Deploy to production
- •Tag release:
git tag -a v$(Get-Date -Format 'yyyyMMdd.HHmm') -m "Production release" - •Push tags:
git push --tags
Rollback Plan
If issues detected: git revert HEAD --no-edit && git push
Post-Deploy
- •Monitor error rates for 15 minutes
- •Verify health check endpoints
- •Update deployment log