From 1ca88df3edd00f2be3b139403d1e636e39804966 Mon Sep 17 00:00:00 2001 From: Tetardtek Date: Sat, 28 Mar 2026 18:36:44 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20smoke=20test=20curl=20-sf=20fails=20on?= =?UTF-8?q?=20401=20=E2=80=94=20use=20http=5Fcode=20check=20instead?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d4d24d6..47e7075 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -53,5 +53,10 @@ jobs: if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: | sleep 3 - curl -sf http://localhost:3520/api/auth/me 2>&1 | grep -q '401\|session\|Not authenticated' - echo "✅ API responds OK" + HTTP_CODE=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:3520/api/auth/me) + if [ "$HTTP_CODE" = "401" ] || [ "$HTTP_CODE" = "200" ]; then + echo "✅ API responds OK (HTTP $HTTP_CODE)" + else + echo "❌ API unreachable (HTTP $HTTP_CODE)" + exit 1 + fi