| name | deploy-check |
| description | Validation complète pré-déploiement. Supporte Vercel, Railway, Docker/VPS. Utilise les scripts Python du projet. |
| argument-hint | - `env` : staging | production (défaut: staging) |
| disable-model-invocation | true |
Arguments
env : staging | production
Étape 1 — Pre-deploy checks (script unifié)
python scripts/pre_deploy_check.py --env [staging|production]
Couvre : TypeScript, lint, tests, secrets, .env.example, console.log, migrations, RLS.
Bloquer si exit 1.
Étape 2 — Plateforme de déploiement
Vercel (recommandé SaaS Next.js)
vercel --env staging
vercel --prod
Variables requises dans Vercel : DATABASE_URL (pooler port 6543), DIRECT_URL (port 5432),
NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY, SUPABASE_SERVICE_ROLE_KEY.
Railway
railway up --environment staging
railway up --environment production
Docker / VPS (Coolify, Dokku)
docker build -t app:$(git rev-parse --short HEAD) .
docker push [registry]/app:[tag]
Étape 3 — Migrations DB (si Supabase)
python scripts/supabase_migrate.py --diff
python scripts/supabase_migrate.py --env [env]
python scripts/supabase_rls_check.py
Étape 4 — Post-deploy
- Smoke test :
curl https://[domain]/api/health
- Logs plateforme — 0 erreur 500 dans les 2 premières minutes
- Sentry — nouvelles erreurs ?
- Mettre à jour
.claude/memory/session.md avec la version déployée
Rollback
Vercel : vercel rollback [deployment-url]
Railway : railway rollback
Docker : redéployer le tag précédent
DB : créer une nouvelle migration inverse (python scripts/supabase_migrate.py --new rollback-[feature])