From eb2bd504a96c2935f0b6707697e999947715d6ea Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 28 Jun 2026 12:00:33 +0200 Subject: [PATCH] try to deploy en nas --- .gitea/workflows/build.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 19795e5..9b8d33d 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -2,43 +2,44 @@ name: Build & Deploy on: push: - branches: [main] + branches: [main, master] pull_request: - branches: [main] + branches: [main, master] jobs: - build-and-deploy: - runs-on: linux:docker,dind + build: + runs-on: linux + container: node:24 steps: - name: Checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install Node.js - run: | - curl -fsSL https://deb.nodesource.com/setup_24.x | bash - - apt-get install -y nodejs - - name: Install dependencies run: npm ci - name: Build project run: npm run build + docker: + needs: build + runs-on: linux:docker,dind + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Login to Gitea Container Registry - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: | echo "${{ secrets.GITEA_TOKEN }}" | docker login http://192.168.1.39:3000 -u "${{ secrets.GITEA_USERNAME }}" --password-stdin - name: Build and push Docker image - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: | docker build -t 192.168.1.39:3000/username/pc-builder:latest -t 192.168.1.39:3000/username/pc-builder:${{ github.sha }} . docker push 192.168.1.39:3000/username/pc-builder:latest docker push 192.168.1.39:3000/username/pc-builder:${{ github.sha }} - name: Trigger deploy - if: github.event_name == 'push' && github.ref == 'refs/heads/main' run: | curl -X POST http://192.168.1.39:9000/deploy || echo "Deploy webhook not reachable"