diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3d359f7..b77c628 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -88,8 +88,16 @@ jobs: - name: Start preview server run: | npm run preview -- --port 4173 & - sleep 10 - npx wait-on http://localhost:4173/ --timeout 60000 + for i in $(seq 1 30); do + if curl -s http://localhost:4173/ > /dev/null 2>&1; then + echo "Server ready on http://localhost:4173/" + exit 0 + fi + echo "Waiting for server... ($i/30)" + sleep 2 + done + echo "Server failed to start" + exit 1 - name: Run Lighthouse CI run: | CHROME_PATH=$(find /home/runner/.cache/ms-playwright -name chrome -type f 2>/dev/null | head -1)