fix(docs-site): root the Render service at the repo root, not docs-site#573
Conversation
Render makes files outside a service's root directory unavailable at build time (https://render.com/docs/monorepo-support). docs-site/go.mod has 'replace github.com/cssbruno/gowdk => ../' and cmd/syncdocs reads ../docs — both outside docs-site/ — so rootDir: docs-site broke the build: the Go build can't resolve the in-tree module and syncdocs can't see ../docs. Drop rootDir and 'cd docs-site' in the build/start commands instead (the pattern #546's static config already used). The binary builds at docs-site/app and starts with 'cd docs-site && ./app'; buildFilter still scopes deploys to docs-site/** and docs/**. Addresses the P1 review finding on this PR.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f3073cf2b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| startCommand: cd docs-site && ./app | ||
| buildFilter: | ||
| paths: | ||
| - docs-site/** |
There was a problem hiding this comment.
Include root module changes in Render autodeploys
Now that the service is rooted at the repo root but still builds from docs-site, this include filter ignores changes to the root module that the build actually consumes (docs-site/go.mod:12 replaces github.com/cssbruno/gowdk with ../, and docs-site/main.go:16 imports it, while the build runs the in-tree CLI). Per Render's build-filter rules, nonmatching paths are ignored when any include path is set, so a change under addons/**, cmd/gowdk/**, internal/**, or root go.mod will not autodeploy the docs binary/static output until an unrelated docs/docs-site change or a manual deploy. Add the root module paths consumed by the build, or remove the include filter.
Useful? React with 👍 / 👎.
Follow-up to #572, which shipped with
rootDir: docs-site— a real bug caught in that PR's review (P1).Problem
Render's monorepo docs: "Files outside your service's root directory are not available to the service at build time or at runtime."
docs-site/go.modhasreplace github.com/cssbruno/gowdk => ../andcmd/syncdocsreads../docs— both outsidedocs-site/. So withrootDir: docs-site, the Go build can't resolve the in-tree framework module andsyncdocscan't see../docs. The build cannot succeed.Fix
rootDir— root the service at the repo root, where the whole repo (parent module +../docs) is available.cd docs-siteinside the build command, andstartCommand: cd docs-site && ./app. This is the same pattern feat(docs-site): deploy as a Go binary on Render #546's static config used.buildFilterstill scopes auto-deploys todocs-site/**anddocs/**.render.yamlstays at the repo root (Render only reads a Blueprint from there).A service's runtime is immutable on Render. If a
gowdk-pageservice already exists as a different runtime, the Blueprint can't convert it — delete the existing service and recreate it from the Blueprint after this merges.