Deploy the application to target platform.
Deploy the application to target platform.
/deploy [environment] [--platform <platform>] [--dry-run]
environment: staging, production (default: staging)--platform: Override auto-detected platform--dry-run: Preview deployment without executingWhen this skill is invoked:
Autonomy:
Safety:
Required before any deployment:
Clean worktree:
git status --porcelain
On correct branch:
main or feature branchmain onlyAll quality checks pass:
make quality # or equivalent from prd/00_technology.md
Up to date with remote:
git fetch origin
git diff HEAD origin/main --stat
Environment variables configured for target environment
Auto-detect from project files:
| File | Platform |
|---|---|
vercel.json or .vercel/ | Vercel |
fly.toml | Fly.io |
Dockerfile + docker-compose.yml | Docker / container registry |
render.yaml | Render |
railway.json | Railway |
Procfile | Heroku |
apprunner.yaml | AWS App Runner |
Fastfile (iOS) | TestFlight via Fastlane |
Fastfile (Android) | Play Console via Fastlane |
app.json (Expo) | EAS Build / Submit |
# Staging (preview)
vercel --yes
# Production
vercel --prod --yes
# Build and tag
docker build -t {registry}/{app}:{version} .
# Push to registry
docker push {registry}/{app}:{version}
# Deploy (platform-specific)
# Fly.io:
fly deploy --image {registry}/{app}:{version}
# Docker Compose (remote):
docker compose -f docker-compose.prod.yml up -d
# Staging
fly deploy --config fly.staging.toml
# Production
fly deploy
# Build and upload
bundle exec fastlane beta
# This typically:
# 1. Increments build number
# 2. Builds archive
# 3. Uploads to App Store Connect
# 4. Submits to TestFlight
# Build and upload
bundle exec fastlane beta
# This typically:
# 1. Increments version code
# 2. Builds AAB
# 3. Uploads to Play Console
# 4. Submits to internal testing track
# Build
eas build --platform all --profile {environment}
# Submit (after build)
eas submit --platform ios --profile {environment}
eas submit --platform android --profile {environment}
Health check:
curl -f https://{deploy_url}/health || echo "Health check failed"
Smoke test key endpoints or screens
Monitor logs for errors:
# Platform-specific log tailing
vercel logs --follow
fly logs
docker compose logs -f
Tag deployment (if not already tagged):
git tag -a deploy/{environment}/$(date +%Y%m%d-%H%M) -m "Deployed to {environment}"
If issues are detected after deployment:
# Vercel
vercel rollback
# Fly.io
fly releases
fly deploy --image {previous_image}
# Docker
docker compose -f docker-compose.prod.yml up -d --force-recreate
# iOS — Cannot rollback TestFlight, submit new build
# Android — Rollback via Play Console halt rollout
$ /deploy staging
Pre-deploy checks...
Branch: main
Worktree: clean
Tests: passing (142/142)
Lint: clean
Detected platform: Vercel
Deploying to staging...
Building: 12s
Deploying: 8s
URL: https://my-app-staging-abc123.vercel.app
Post-deploy verification...
Health check: 200 OK (45ms)
API /users: 200 OK
API /health: 200 OK
Staging deployment successful!
Preview: https://my-app-staging-abc123.vercel.app
To deploy to production:
/deploy production