name: deploy description: Deploy to production. Runs pre-deploy safety checks, pushes to trigger CI/CD, and monitors the deployment. disable-model-invocation: true allowed-tools: Bash(git *), Bash(gh *), Bash(curl *), Bash(pytest *), Bash(ruff *), Bash(mypy *), Bash(npm *)
Deploy to Production
WARNING: This deploys to the live production environment.
Pre-Deploy Checklist
Before pushing, verify ALL of these pass:
- Tests pass: Run the full test suite
- Lint clean: Run the project's linter with no errors
- Types clean: Run the type checker with no errors (if applicable)
- On deploy branch:
git branch --show-currentmust be the deploy branch (usuallymain) - Working tree clean:
git statusshows no uncommitted changes - Up to date:
git pull origin mainhas no conflicts
If ANY check fails, stop and report the issue. Do NOT proceed with deployment.
Deploy
Push to the deploy branch to trigger the CI/CD pipeline:
git push origin main
Monitor
- Watch CI:
gh run list --limit 1-- wait for the run to complete - Check run status:
gh run view <run-id>-- verify all jobs pass - Health check: After CI completes, wait 60 seconds then:
curl -sf https://{PRODUCTION_URL}/health - Expected healthy response includes a status field indicating the service is running
If Deployment Fails
- Check CI logs:
gh run view <run-id> --log-failed - If the app is down, refer to the project's runbook for rollback procedures
- Quick rollback: revert the commit and push again
Reference
Check the project's deploy/ directory or ops documentation for full operational procedures.