| name | deploy |
| description | Deploy backend (Cloud Run), frontend (static/Cloud Run), or mobile (EAS). Use when publishing changes to production. |
| disable-model-invocation | true |
| allowed-tools | Bash, Read, Grep |
| argument-hint | [backend|frontend|mobile-android|mobile-ios|ota] [--skip-checks] |
Deploy
Deploy the application to production. Runs pre-flight checks unless --skip-checks is passed.
Usage
/deploy backend — Deploy Django backend to GCP Cloud Run
/deploy frontend — Deploy React frontend (build + deploy)
/deploy mobile-android — Build + submit Android AAB to Google Play
/deploy mobile-ios — Build iOS on EAS cloud + submit to TestFlight
/deploy ota — Publish OTA JS update to production channel (mobile, JS-only changes)
Backend — GCP Cloud Run
Pre-flight Checks
cd backend && git status
python manage.py showmigrations | grep "\[ \]"
python manage.py migrate --check
Build & Push Docker Image
IMAGE="<region>-docker.pkg.dev/<project>/<repo>/backend:latest"
docker build -t $IMAGE backend/
docker push $IMAGE
Deploy
gcloud run deploy backend \
--image $IMAGE \
--region <region> \
--platform managed
Post-Deploy
gcloud run jobs execute migrate-job --region <region>
curl https://<backend-url>/api/health/
Note: gcloud auth requires interactive browser login. Flag this early if not already authenticated.
Frontend — React (Vite)
Build
cd frontend && npm run build
Deploy (Docker/Cloud Run or static hosting)
IMAGE="<region>-docker.pkg.dev/<project>/<repo>/frontend:latest"
docker build -t $IMAGE frontend/
docker push $IMAGE
gcloud run deploy frontend --image $IMAGE --region <region>
Mobile Android — EAS Build + Google Play
Pre-flight
cd <mobile-dir>
cat app.json | grep -A3 '"android"'
cat android/app/build.gradle | grep versionCode
Bump Version (unless --skip-checks)
Build AAB
cd <mobile-dir> && eas build --platform android --profile production --local
Submit to Google Play
eas submit --platform android --latest
Mobile iOS — EAS Cloud Build + TestFlight
Build (cloud, no Mac required)
cd <mobile-dir> && eas build --platform ios --profile production --non-interactive
eas build:list --platform ios --limit 1
Submit to TestFlight
eas submit --platform ios --latest --non-interactive
Mobile OTA Update — EAS Update (JS-only)
When to Use
Only for TypeScript/JavaScript changes. Native changes (new packages, AndroidManifest, Info.plist) require full build.
Publish
cd <mobile-dir> && eas update --branch production --message "<description of changes>"
eas update:list --branch production --limit 1
Celery Workers (after backend deploy)
Workers must be restarted after deploying new task code:
docker compose restart celery
Rollback
Backend
gcloud run revisions list --service backend --region <region>
gcloud run services update-traffic backend --to-revisions=<previous-revision>=100
Mobile
- OTA: Deploy previous update bundle
- Full build: Submit previous AAB/IPA manually