Skip to content

fix(docs-site): root the Render service at the repo root, not docs-site#573

Merged
cssbruno merged 1 commit into
mainfrom
fix/render-rootdir-monorepo
Jun 20, 2026
Merged

fix(docs-site): root the Render service at the repo root, not docs-site#573
cssbruno merged 1 commit into
mainfrom
fix/render-rootdir-monorepo

Conversation

@cssbruno

Copy link
Copy Markdown
Owner

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.mod has replace github.com/cssbruno/gowdk => ../ and cmd/syncdocs reads ../docsboth outside docs-site/. So with rootDir: docs-site, the Go build can't resolve the in-tree framework module and syncdocs can't see ../docs. The build cannot succeed.

Fix

  • Remove rootDir — root the service at the repo root, where the whole repo (parent module + ../docs) is available.
  • cd docs-site inside the build command, and startCommand: cd docs-site && ./app. This is the same pattern feat(docs-site): deploy as a Go binary on Render #546's static config used.
  • buildFilter still scopes auto-deploys to docs-site/** and docs/**.

render.yaml stays at the repo root (Render only reads a Blueprint from there).

⚠️ Operational (the other review finding, P2)

A service's runtime is immutable on Render. If a gowdk-page service 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.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread render.yaml
startCommand: cd docs-site && ./app
buildFilter:
paths:
- docs-site/**

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@cssbruno cssbruno merged commit 3dccd03 into main Jun 20, 2026
16 checks passed
@cssbruno cssbruno deleted the fix/render-rootdir-monorepo branch June 20, 2026 19:20
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