From 405dc3e379601c26c4767ff8858d563cd2e139cd Mon Sep 17 00:00:00 2001 From: root Date: Mon, 22 Jun 2026 00:57:53 -0400 Subject: [PATCH] fix(ci): remove GitHub-specific marketplace actions incompatible with Gitea act runner - Remove actions/cache@v4 (uses GitHub's artifact API not available in Gitea) - Remove actions/upload-artifact@v4 (same reason) - Remove actions/download-artifact@v4 (same reason) - Deploy job now builds from source instead of downloading artifacts - Deploy container changed from alpine:3.20 to node:22-alpine for npm build --- .gitea/workflows/build.yml | 39 +++++++++----------------------------- 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fdee501..3d848a3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -44,14 +44,6 @@ jobs: git checkout "${{ github.sha }}" shell: sh - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: node_modules/ - key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: Install dependencies run: npm ci --no-audit --no-fund @@ -82,14 +74,6 @@ jobs: git checkout "${{ github.sha }}" shell: sh - - name: Cache npm dependencies - uses: actions/cache@v4 - with: - path: node_modules/ - key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - restore-keys: | - ${{ runner.os }}-npm- - - name: Install dependencies run: npm ci --no-audit --no-fund @@ -98,13 +82,6 @@ jobs: env: VITE_API_ORIGIN: ${{ vars.VITE_API_ORIGIN || '' }} - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist/ - retention-days: 7 - # ────────────────────────────────────────────── # DEPLOY (manual): to shared hosting via SSH # ────────────────────────────────────────────── @@ -112,7 +89,7 @@ jobs: name: Deploy to shared hosting runs-on: ubuntu-latest container: - image: alpine:3.20 + image: node:22-alpine if: github.ref == 'refs/heads/develop' needs: [lint, build] environment: @@ -134,16 +111,18 @@ jobs: git checkout "${{ github.sha }}" shell: sh + - name: Install dependencies + run: npm ci --no-audit --no-fund + + - name: Build project + run: npm run build + env: + VITE_API_ORIGIN: ${{ vars.VITE_API_ORIGIN || '' }} + - name: Install SSH and rsync run: | apk add --no-cache openssh-client sshpass rsync - - name: Download built artifacts - uses: actions/download-artifact@v4 - with: - name: dist - path: dist/ - - name: Deploy built files to shared hosting run: | sshpass -p "${{ secrets.SSH_PASSWORD }}" rsync -avz --delete \