on: push: defaults: run: shell: bash env: TZ: Asia/Shanghai jobs: test-httpserver: runs-on: ubuntu-latest steps: - name: step1 run: | set -x mkdir -p gitea echo '

hello world

' > gitea/index.html npm install -g http-server npx http-server -p=4251 ./gitea & SERVER_PID=$! sleep 10 # 等待服务器启动 curl http://localhost:4251/ -v kill $SERVER_PID - run: echo "DONE"