① Source Control
GitHub Repo
Mono-repo: backend + mobile
Pull Request
Branch → develop or main
② Continuous Integration (ci.yml)
Lint + Type Check
ESLint SARIF · TypeScript tsc
Tests
Jest · Postgres + Redis services
Docker Build
Multi-arch · GHCR push · Layer cache
Security Scan
Trivy CVE · npm audit · OWASP
③ Deploy to Staging — develop branch (deploy-staging.yml)
DB Migrations
Run via Docker against staging DB
ECS Deploy
Rolling update · Fargate
Health Check
5 retries · /api/health · Smoke tests
④ Deploy to Production — main branch · Approval required (deploy-production.yml)
Approval Gate
GitHub Environment: production
Required reviewer sign-off
Required reviewer sign-off
Snapshot
Save current task def for rollback
Blue/Green Deploy
CodeDeploy · Zero downtime
Verify + Tag
Health · Smoke tests · GitHub Release
CI/CD Pipeline
Click any node for details
Pipeline Overview
CI ToolGitHub Actions
RegistryGHCR (ghcr.io)
DeployAWS ECS Fargate
IaCTerraform 1.7+
OrchestrationKubernetes (EKS)
MobileEAS Build + Submit
Branch Strategy
feature/* → develop
↳ CI + staging deploy
develop → main
↳ CI + approval + production
main → v*.*.* tag
↳ GitHub Release
Estimated Pipeline Times
Lint + Test~3 min
Docker Build~4 min (cached)
Security Scan~2 min
Staging Deploy~5 min
Prod Deploy~8 min
EAS Mobile~15 min