deploy: change health check strategy
Déploiement Frontend BETA / Lint et tests (push) Successful in 1m57s
Déploiement Frontend BETA / Déploiement beta (push) Failing after 1m23s

This commit is contained in:
2026-05-15 21:51:13 +04:00
parent 26f610fc24
commit 310d5abb8b
+4 -10
View File
@@ -58,20 +58,14 @@ jobs:
echo "==> Build et démarrage du frontend"
docker compose up -d --build
echo "==> État des conteneurs"
docker compose ps
echo "==> Logs frontend (30s)"
sleep 30
docker compose logs --tail=50 frontend
echo "==> Vérification santé"
for i in $(seq 1 12); do
if curl -sf http://localhost:4000 | grep -q "html"; then
echo "Déploiement OK"
status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4000)
if echo "$status" | grep -qE "^[23]"; then
echo "Déploiement OK (HTTP $status)"
exit 0
fi
echo " Attente... ($i/12)"
echo " Attente... ($i/12) [HTTP $status]"
sleep 5
done
echo "Échec : le frontend ne répond pas après 60s"