From cb7894bbc272bebeb9ad537ce1ca8bbf9d007eb8 Mon Sep 17 00:00:00 2001 From: kurihada Date: Mon, 1 Jun 2026 16:35:25 +0800 Subject: [PATCH] Add Gitea Actions workflow (migrated from Jenkins) --- .gitea/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 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..f2ef299 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Build and Deploy + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + container: + options: -v /var/run/docker.sock:/var/run/docker.sock + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build Docker image + run: | + docker build -t impulse-jail:latest -t impulse-jail:${{ github.sha }} . + + - name: Deploy + run: | + docker stop impulse-jail || true + docker rm impulse-jail || true + mkdir -p /data/impulse-jail + chown 1001:1001 /data/impulse-jail + docker run -d \ + --name impulse-jail \ + --network nginx \ + -p 3002:3000 \ + -v /data/impulse-jail:/app/data \ + -e DATABASE_URL=file:/app/data/prod.db \ + --restart unless-stopped \ + impulse-jail:latest