From 6689a47f239ef3e93586389b2f063a5687e82bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdongming=E2=80=9D?= <“lidongming@aituringflow.com”> Date: Tue, 16 Dec 2025 00:25:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 21f2319..3f3f59e 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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: