diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 084cd96d..13d012fc 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -389,8 +389,9 @@ jobs: exit 1 fi - echo "Waiting for HTTP health check..." - HEALTH_URL="${DEPLOY_HEALTH_URL:-http://127.0.0.1:3000/api/health}" + DEPLOY_PORT="$(grep -E '^[[:space:]]*PORT=.+' "${LIVE}/.env" 2>/dev/null | cut -d= -f2 | tr -d '"' || echo '3002')" + echo "Waiting for HTTP health check on port ${DEPLOY_PORT}..." + HEALTH_URL="${DEPLOY_HEALTH_URL:-http://127.0.0.1:${DEPLOY_PORT}/api/health}" HEALTH_OK=0 for i in $(seq 1 15); do BODY="$(curl -sf --max-time 5 "${HEALTH_URL}" 2>/dev/null || true)"