Skip to main content

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

  1. GitHubActionsDeploy to Production
  2. Click Run workflow
  3. (Optional) Enter commit SHA
  4. Click Run workflow
  5. Wait for approval (notification sent)
  6. Approve in GitHub Actions
  7. Monitor deployment

Rollback

  1. GitHubActionsDeploy to Production
  2. Click Run workflow
  3. Enter previous commit SHA
  4. Click Run workflow
  5. Approve deployment

Workflow Files

FileTriggerPurpose
premerge-validate.ymlPR to mainValidate before merge
deploy-staging-from-main.ymlMerge to mainAuto-deploy staging
deploy-production.ymlManual triggerDeploy production (approval)

Change Detection

Only changed apps deploy:

  • apps/backend/** → Backend
  • apps/web-app/** → Web App
  • apps/landing-page/** → Landing Page
  • apps/frontend-pwa/** → Frontend PWA

Environments

EnvironmentDeploymentApprovalSecrets
StagingAutomaticNoneGitHub Environment: staging
ProductionManualRequiredGitHub Environment: production

Troubleshooting

IssueSolution
Staging not deployingCheck PR was merged, verify workflow exists
Production needs approvalThis is expected! Approve in GitHub Actions
Secrets not foundVerify secrets in GitHub Environment (not repo secrets)
Wrong app deployingCheck 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