diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..8e55490 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: Deploy to Pi + +on: + push: + branches: + - actions + +jobs: + deploy: + runs-on: self-hosted + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Stop existing server + run: | + pkill -f 'python3 -m http.server' || true + + - name: Start server + run: | + chmod +x ./start.sh + nohup ./start.sh > server.log 2>&1 &