From 5000cbeb6df63be2e1cb5b21dc2bd51141def6ee Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 15 Oct 2026 14:43:00 +0200 Subject: [PATCH] fix(deploy-vercel): skip workspace dependencies without a build script pnpm fails the dependency build when the selection is a single package without a build script (a workspace whose only dependency is source-only, e.g. apps/docs on @aragon/docs-corpus). `run --if-present build` skips those instead. --- .github/workflows/deploy-vercel.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml index ba817a1..67ecab7 100644 --- a/.github/workflows/deploy-vercel.yml +++ b/.github/workflows/deploy-vercel.yml @@ -331,10 +331,12 @@ jobs: # Workspace packages that ship a built `dist/` must be compiled before `vercel build`: the # lambda resolves them via package.json exports, and Node cannot execute the TypeScript # source under packages/*/src. The `{dir}^...` filter selects only the dependencies of the - # workspace (never the workspace itself) and is a no-op for workspaces without buildable deps. + # workspace (never the workspace itself); `--if-present` skips the dependencies that have no + # build script — pnpm fails on them when the selection is a single package, e.g. a workspace + # whose only dependency is a source-only package. - name: Build workspace dependencies if: inputs.workspace != '.' - run: pnpm --filter "{$WORKSPACE}^..." build + run: pnpm --filter "{$WORKSPACE}^..." run --if-present build # Vercel never builds from git here: the artifact is built in this job and uploaded as-is # (deploy --prebuilt). All vercel commands run from the repo root so bundlers treat the pnpm