diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 3c7a34f..424291b 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -87,10 +87,16 @@ jobs: - name: Wait for Live Server run: | - for i in {1..10}; do # tries 10 times at 5-second intervals - curl http://127.0.0.1:8081 && break - echo "Waiting for live-server to be ready..." - sleep 5 + attempts=0 + max_attempts=10 + while ! curl --output /dev/null --silent --head --fail http://127.0.0.1:8081; do + if [ $attempts -eq $max_attempts ]; then + echo "Live server not ready after $max_attempts attempts" + exit 1 + fi + attempts=$((attempts+1)) + echo "Waiting for live-server to be ready... attempt $attempts" + sleep 5 done - name: Test HTTP Request