ci(workflow): 简化pnpm缓存配置

使用内置的pnpm缓存配置替代手动缓存设置,简化工作流程
This commit is contained in:
zhanggy committed 2025-10-30 11:18:55 +08:00
1 parent 7452edc686
commit afc9ab6327
1 file changed
+1 -13
+1 -13
View File
@@ -42,19 +42,7 @@ jobs:
run_install: | run_install: |
- recursive: true - recursive: true
args: [--frozen-lockfile=false] args: [--frozen-lockfile=false]
cache: 'pnpm'
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies - name: Install dependencies
run: pnpm install --no-frozen-lockfile run: pnpm install --no-frozen-lockfile