Skip to content

fix: build the web project from apps/web, not the repo root - #9

Merged
code-x-1010 merged 1 commit into
mainfrom
fix/web-deploy-working-directory
Sep 8, 2026
Merged

fix: build the web project from apps/web, not the repo root#9
code-x-1010 merged 1 commit into
mainfrom
fix/web-deploy-working-directory

Conversation

@code-x-1010

Copy link
Copy Markdown
Collaborator

Deploy API (production) is green now. Deploy web (production) is the last job that has never succeeded, and it fails with:

Error: The pattern "index.py" defined in `functions` doesn't match any Serverless Functions.

Cause

That's the API's vercel.json. The web project was linked from inside apps/web, which leaves its rootDirectory null, so Vercel resolves config and source relative to the working directory. CI ran every step from the repo root, where the only vercel.json describes a FastAPI function.

Fix

Both web jobs now set working-directory: apps/web.

Verified locally before pushing this time, rather than after — we'd spent five CI round-trips discovering these one at a time. vercel build --prod from apps/web produces a real Next.js build, and the output's config.json carries the rewrite the whole same-origin design rests on:

{"src": "^/api(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?$",
 "dest": "https://workflowguard-api.vercel.app/api/$1", "check": true}

Docs correction

docs/vercel.md claimed the web project's Root Directory was apps/web. It isn't — linking from that directory sets nothing. The table now says so and explains why the jobs need working-directory instead.

Pipeline progress

Run Died at Cause
1 vercel pull secrets not set
2 vercel pull token scoped to personal account
3 vercel build (api) uv missing
4 upload (api) .vercelignore withheld tracked files
5 vercel build (web) this

Everything except deploy-web is now green, including a successful API deploy from CI.

Deploy web failed with:

  Error: The pattern "index.py" defined in `functions` doesn't match any
  Serverless Functions.

That is the API's vercel.json. The web project was linked from inside apps/web,
which leaves its rootDirectory null, so vercel resolves config and source
relative to the working directory -- and CI ran every step from the repo root,
where the only vercel.json describes a FastAPI function.

Both web jobs now set working-directory: apps/web. Verified locally before
pushing rather than after: `vercel build --prod` from that directory produces a
Next.js build, and the output's config.json carries the rewrite the whole
same-origin design depends on:

  {"src": "^/api(?:/((?:[^/]+?)(?:/(?:[^/]+?))*))?$",
   "dest": "https://workflowguard-api.vercel.app/api/$1"}

docs/vercel.md claimed the web project's Root Directory was apps/web. It is not
-- linking from that directory sets nothing -- so the table now says so and
explains why the jobs need the working directory instead.

Deploy API is green as of the previous run; this is the last job that has never
succeeded.
@code-x-1010
code-x-1010 merged commit e49f68b into main Sep 8, 2026
9 of 10 checks passed
@code-x-1010
code-x-1010 deleted the fix/web-deploy-working-directory branch September 9, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant