Deployment Workflow Quick Reference
A one-page quick reference for the deployment workflow.
Daily Workflow
# 1. Create feature branch from main
git checkout main && git pull && git checkout -b feature/my-feature
# 2. Make changes
# ... edit files ...
# 3. Commit and push
git add .
git commit -m "feat: description"
git push origin feature/my-feature
# 4. Create PR to main on GitHub
# 5. Wait for pre-merge validation
# 6. Get approval and merge
# 7. Staging deploys automatically
# 8. Test in staging
# 9. Manually trigger production deployment
Production Deployment
- GitHub → Actions → Deploy to Production
- Click Run workflow
- (Optional) Enter commit SHA
- Click Run workflow
- Wait for approval (notification sent)
- Approve in GitHub Actions
- Monitor deployment
Rollback
- GitHub → Actions → Deploy to Production
- Click Run workflow
- Enter previous commit SHA
- Click Run workflow
- Approve deployment
Workflow Files
| File | Trigger | Purpose |
|---|---|---|
premerge-validate.yml | PR to main | Validate before merge |
deploy-staging-from-main.yml | Merge to main | Auto-deploy staging |
deploy-production.yml | Manual trigger | Deploy production (approval) |
Change Detection
Only changed apps deploy:
apps/backend/**→ Backendapps/web-app/**→ Web Appapps/landing-page/**→ Landing Pageapps/frontend-pwa/**→ Frontend PWA
Environments
| Environment | Deployment | Approval | Secrets |
|---|---|---|---|
| Staging | Automatic | None | GitHub Environment: staging |
| Production | Manual | Required | GitHub Environment: production |
Troubleshooting
| Issue | Solution |
|---|---|
| Staging not deploying | Check PR was merged, verify workflow exists |
| Production needs approval | This is expected! Approve in GitHub Actions |
| Secrets not found | Verify secrets in GitHub Environment (not repo secrets) |
| Wrong app deploying | Check change detection in workflow logs |
Key Commands
# Create feature branch
git checkout main && git pull && git checkout -b feature/name
# Check what changed
git diff main...feature/name
# Update branch
git checkout main && git pull && git checkout feature/name && git merge main
Important Notes
- ✅ Always test in staging before production
- ✅ Production requires manual trigger + approval
- ✅ Only changed apps deploy (saves time)
- ✅ Use descriptive commit messages
- ✅ Delete merged branches
See Also: Full Deployment Guide, Migration Guide