mirror of
https://github.com/142vip/408CSFamily.git
synced 2026-07-11 01:26:42 +08:00
fix: 修复持续交付vercel异常
This commit is contained in:
23
.github/workflows/CD.yaml
vendored
23
.github/workflows/CD.yaml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user