Skip to content

Commit 0b826b4

Browse files
committed
🔧chore: 更新GitHub Actions配置以优化pnpm使用 [deploy]
- 将pnpm的安装步骤替换为使用官方Action,简化配置 - 添加pnpm缓存步骤以提升依赖安装效率 - 确保与项目的依赖管理方式保持一致
1 parent 574630f commit 0b826b4

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,19 @@ jobs:
2222
with:
2323
node-version: 20 # 使用你项目所需的 Node.js 版本
2424

25-
- name: 安装 pnpm
26-
run: npm install -g pnpm
25+
- name: 使用官方 Action
26+
uses: pnpm/action-setup@v2
27+
with:
28+
version: latest
29+
run_install: false
30+
31+
- name: 启用 pnpm 缓存
32+
uses: actions/cache@v3
33+
with:
34+
path: ~/.pnpm-store
35+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-
2738
2839
- name: 检查 pnpm 版本
2940
run: pnpm --version

0 commit comments

Comments
 (0)