From ad66ae1b46269724335de3ab73c7bdc471376353 Mon Sep 17 00:00:00 2001 From: R2m1liA <15258427350@163.com> Date: Wed, 24 Sep 2025 17:12:08 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E8=B0=83=E6=95=B4workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改.nuxt缓存位置 --- .gitea/workflows/deploy.yml | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index e71e935..4407899 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -3,7 +3,7 @@ name: deploy to server on: push jobs: - build: + build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout @@ -24,6 +24,8 @@ jobs: key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm- + - name: Install dependencies + run: pnpm install # Nuxt 构建缓存,加快二次构建 - name: Cache Nuxt build uses: actions/cache@v4 @@ -32,28 +34,7 @@ jobs: key: ${{ runner.os }}-nuxt-${{ hashFiles('pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-nuxt- - - - name: Install dependencies - run: pnpm install - name: Build project run: pnpm run build - - name: Upload build output - uses: actions/upload-artifact@v4 - with: - name: nuxt-output - path: .output/ - - deploy: - runs-on: ubuntu-latest - needs: build - # if: github.ref == 'refs/heads/master' - steps: - - name: Checkout - uses: actions/checkout@v5 - - name: Download build output - uses: actions/download-artifact@v4 - with: - name: nuxt-output - path: .output/ - name: Rsync build artifact to server run: rsync -avz --delete .output/ remilia@192.168.86.5:/home/remilia/Jinshenwebsite/front-build