diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index c35058f..575c6d9 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -14,8 +14,6 @@ jobs: submodules: 'true' - name: Run build task run: hugo --minify - - name: Test static page - run: bash ${{ gitea.workspace }}/bin/test_static_page.sh - name: Deploy to Server uses: https://git.myco.systems/mirrors/ssh-deploy@main env: diff --git a/bin/test_static_page.sh b/bin/test_static_page.sh deleted file mode 100644 index 14f4c97..0000000 --- a/bin/test_static_page.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -PORT=8080 -python3 -m http.server $PORT --directory public/ & - -SERVER_PID=$! - -# Give it a moment to start -sleep 2 - -# Check if the server is running -if ! ps -p $SERVER_PID > /dev/null; then - echo "HTTP server failed to start." - exit 1 -fi - -# Check HTTP status -status_code=$(curl -o /dev/null -s -w "%{http_code}" http://localhost:$PORT) - -# Kill the http server -kill $SERVER_PID - -# Check if status code is 200 -if [ "$status_code" -ne 200 ]; then - echo "Website returned a non-200 status code: $status_code" - exit 1 -fi \ No newline at end of file