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