ci(deploy): drop setup-node pnpm cache (fails on legacy Workers)

setup-node's cache: 'pnpm' requires the cache-dependency-path to
resolve, but several legacy .component-builds/* Workers only ship
package-lock.json (historical mixed state — see rule
05-deploy-convention.md). With pnpm-lock.yaml missing, setup-node
fails fast with "Some specified paths were not resolved" before
the install step's fallback logic even gets a chance to run.

Since each Worker deploy takes ~30s on its own runner, skipping
the per-job cache costs nothing in practice.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-20 20:52:39 +08:00
parent 38b42a2662
commit 2bfe16ba61
+8 -4
View File
@@ -198,8 +198,10 @@ jobs:
- uses: actions/setup-node@v5 - uses: actions/setup-node@v5
with: with:
node-version: '22' node-version: '22'
cache: 'pnpm' # 不用 setup-node 的 pnpm cache:
cache-dependency-path: ${{ matrix.worker.path }}/pnpm-lock.yaml # 部分歷史 Worker 只有 package-lock.json,指 pnpm-lock.yaml 會讓
# setup-node 直接報 "Some specified paths were not resolved" 並 fail。
# deploy 本身 ~30s,cache 省不了多少;穩定性優先。
- name: Setup TinyGo - name: Setup TinyGo
uses: acifani/setup-tinygo@v2 uses: acifani/setup-tinygo@v2
@@ -273,8 +275,10 @@ jobs:
- uses: actions/setup-node@v5 - uses: actions/setup-node@v5
with: with:
node-version: '22' node-version: '22'
cache: 'pnpm' # 不用 setup-node 的 pnpm cache:
cache-dependency-path: ${{ matrix.worker.path }}/pnpm-lock.yaml # 部分歷史 Worker 只有 package-lock.json,指 pnpm-lock.yaml 會讓
# setup-node 直接報 "Some specified paths were not resolved" 並 fail。
# deploy 本身 ~30s,cache 省不了多少;穩定性優先。
- name: Install deps - name: Install deps
working-directory: ${{ matrix.worker.path }} working-directory: ${{ matrix.worker.path }}