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" echo "==> Build et démarrage du frontend"
docker compose up -d --build 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é" echo "==> Vérification santé"
for i in $(seq 1 12); do for i in $(seq 1 12); do
if curl -sf http://localhost:4000 | grep -q "html"; then status=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:4000)
echo "Déploiement OK" if echo "$status" | grep -qE "^[23]"; then
echo "Déploiement OK (HTTP $status)"
exit 0 exit 0
fi fi
echo " Attente... ($i/12)" echo " Attente... ($i/12) [HTTP $status]"
sleep 5 sleep 5
done done
echo "Échec : le frontend ne répond pas après 60s" echo "Échec : le frontend ne répond pas après 60s"