From 417a8bbe43796be582ed0db62b97e43cca834276 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 3 Apr 2025 16:13:12 -0700 Subject: [PATCH] add deploy script --- .gitea/workflows/deploy.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .gitea/workflows/deploy.yml 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 &