From 57473e5e491a0133a2b5494c3b9e7e65b990dd23 Mon Sep 17 00:00:00 2001 From: mmdapl <40396940+mmdapl@users.noreply.github.com> Date: Thu, 28 Sep 2023 16:25:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=8C=81=E7=BB=AD?= =?UTF-8?q?=E4=BA=A4=E4=BB=98vercel=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CD.yaml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml index 1663d74..508f161 100644 --- a/.github/workflows/CD.yaml +++ b/.github/workflows/CD.yaml @@ -30,18 +30,17 @@ jobs: # “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录 fetch-depth: 0 - - name: PNPM Install - uses: pnpm/action-setup@v2 - with: - version: 7 - name: Install Node.js uses: actions/setup-node@v3 with: node-version: 18.18.0 - cache: 'pnpm' - - run: pnpm i --frozen-lockfile --registry https://registry.npmmirror.com + - name: PNPM Install + uses: pnpm/action-setup@v2 + with: + version: 7 + run_install: true - name: Cache Dependencies uses: actions/cache@v3 @@ -86,7 +85,7 @@ jobs: deploy-vercel: name: "部署到Vercel平台" needs: install-init - runs-on: macos-latest + runs-on: ubuntu-latest if: github.repository == '142vip/408CSFamily' steps: - name: Checkout Code @@ -102,11 +101,11 @@ jobs: key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: vercel -v && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} ## 注意:安装pnpm - name: Build Project Artifacts - run: npm i pnpm@7 -g && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + run: npm i pnpm -g && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} @@ -120,12 +119,6 @@ jobs: if: github.repository == '142vip/408CSFamily' && startsWith(github.event.head_commit.message, 'chore(release):') steps: - - name: Restore Dependencies From cache - uses: actions/cache@v3 - with: - path: | - node_modules - key: ${{ runner.os }}-node_modules-${{ hashFiles('**/pnpm-lock.yaml') }} ### 打成压缩包 - name: Create Zip Package