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 \