From 2bfe16ba61cf257f9fabcea6fbe746413e63b7e2 Mon Sep 17 00:00:00 2001 From: richblack Date: Mon, 20 Apr 2026 20:52:39 +0800 Subject: [PATCH] ci(deploy): drop setup-node pnpm cache (fails on legacy Workers) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/deploy.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d7341f8..9664fb6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -198,8 +198,10 @@ jobs: - uses: actions/setup-node@v5 with: node-version: '22' - cache: 'pnpm' - cache-dependency-path: ${{ matrix.worker.path }}/pnpm-lock.yaml + # 不用 setup-node 的 pnpm cache: + # 部分歷史 Worker 只有 package-lock.json,指 pnpm-lock.yaml 會讓 + # setup-node 直接報 "Some specified paths were not resolved" 並 fail。 + # deploy 本身 ~30s,cache 省不了多少;穩定性優先。 - name: Setup TinyGo uses: acifani/setup-tinygo@v2 @@ -273,8 +275,10 @@ jobs: - uses: actions/setup-node@v5 with: node-version: '22' - cache: 'pnpm' - cache-dependency-path: ${{ matrix.worker.path }}/pnpm-lock.yaml + # 不用 setup-node 的 pnpm cache: + # 部分歷史 Worker 只有 package-lock.json,指 pnpm-lock.yaml 會讓 + # setup-node 直接報 "Some specified paths were not resolved" 並 fail。 + # deploy 本身 ~30s,cache 省不了多少;穩定性優先。 - name: Install deps working-directory: ${{ matrix.worker.path }}