fix:修改CI
This commit is contained in:
@@ -12,9 +12,16 @@ jobs:
|
||||
image: swr.cn-south-1.myhuaweicloud.com/bws/node:20.19.6-bookworm-slim-ci
|
||||
|
||||
steps:
|
||||
# 1. 拉取代码
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# 2. 设置 pnpm(runner 已预装 Node.js,跳过 setup-node)
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.23.0
|
||||
|
||||
- name: Parse tag to env
|
||||
run: |
|
||||
# 获取 tag 名称(Gitea Actions 使用 GITHUB_REF_NAME)
|
||||
@@ -45,25 +52,19 @@ jobs:
|
||||
- name: Check toolchain (debug only, 可选)
|
||||
run: |
|
||||
node -v || echo "node not found"
|
||||
npm -v || echo "npm not found"
|
||||
pnpm -v || echo "pnpm not found"
|
||||
curl --version || echo "curl not found"
|
||||
|
||||
# 已经在 node:20-bookworm-slim 容器内,无需再 setup-node
|
||||
# - name: Setup Node
|
||||
# uses: actions/setup-node@v4
|
||||
# with:
|
||||
# node-version: '20'
|
||||
|
||||
- name: Use CN npm registry
|
||||
run: |
|
||||
npm config set registry http://repo.myhuaweicloud.com/repository/npm/
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
npm ci --no-audit --no-fund
|
||||
pnpm ci --no-audit --no-fund
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Deploy to Cloudflare Pages
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user