Skip to content

[codex] Check in docs-site generated output#598

Merged
cssbruno merged 1 commit into
mainfrom
codex/docs-site-check-in-dist
Jun 20, 2026
Merged

[codex] Check in docs-site generated output#598
cssbruno merged 1 commit into
mainfrom
codex/docs-site-check-in-dist

Conversation

@cssbruno

Copy link
Copy Markdown
Owner

Summary

  • Check in docs-site/dist/site so Render's default Go build can deploy the docs-site server without a custom build command.
  • Update ignore rules to intentionally allow docs-site/dist/site while keeping other generated/local output ignored.
  • Update docs-site build docs and Render config to build an in-tree tools/gowdk CLI binary before regenerating output when the custom build command is used.

Why

After #597, the docs-site server compiles cleanly without //go:embed, but Render's default Go service build still only runs:

go build -tags netgo -ldflags '-s -w' -o app

That produces ./app but does not generate dist/site, so startup fails with:

generated site output missing at "dist/site"

If the service cannot rely on a custom Build Command, the generated site output has to be present in the checkout. This PR makes that explicit.

Verification

  • Generated docs-site output with:
    • (cd .. && go build -o docs-site/tools/gowdk ./cmd/gowdk)
    • go run ./cmd/syncdocs
    • ./tools/gowdk build
  • go test ./... from docs-site.
  • Render-default smoke from docs-site:
    • go build -tags netgo -ldflags '-s -w' -o app .
    • GOWDK_ADDR=127.0.0.1:18117 ./app
    • curl / and /docs/reference/config/ successfully returned HTML.
  • git diff --cached --check.

@cssbruno cssbruno marked this pull request as ready for review June 20, 2026 20:21

@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: 43bf6dc239

ℹ️ 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 on lines +26 to +27
<a href="/docs/cookbook/">native cookbook</a>. For full lessons, use the
<a href="/docs/learning/native/">native learning path</a>.</p><h2 id="cli-and-project-shape">CLI And Project Shape</h2><ul><li><a href="/docs/reference/cli/">CLI</a>: current <code>gowdk</code> command surface.</li><li><a href="/docs/reference/config/">Config</a>: current Go config types and build target fields.</li><li><a href="/docs/reference/dev/">Dev server</a>: <code>gowdk dev</code> rebuild, live reload, generated-app restart,

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 Generate the linked cookbook and learning pages

This committed page links to /docs/cookbook/ and /docs/learning/native/, but neither path exists under docs-site/dist/site and neither route appears in gowdk-routes.json, so the checked-in site served by docs-site/main.go returns 404 for both. Please include the cookbook/learning markdown in the generated site or keep these as repository links before relying on this committed output.

Useful? React with 👍 / 👎.

examples/pages/home.page.gwdk \
examples/pages/hero.cmp.gwdk
</code></pre><p>For a broader path, use <a href="/docs/learning/native/">Native Learning Path</a> and the
full-stack <a href="/docs/../examples/flagship/">flagship example</a>.</p><h2 id="playground-cli">Playground CLI</h2><p>Inspect the sandbox policy:</p><pre><code class="language-sh">gowdk playground policy

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 Keep example links from becoming docs routes

This generated link normalizes to /examples/flagship/, but the checked-in dist/site tree has no examples/flagship/index.html, so clicking the flagship example from the published Playground page will 404. Links that leave the docs/ tree need to remain source/GitHub links or be excluded from the .md route rewrite before committing dist/site.

Useful? React with 👍 / 👎.

"stage": "manifest",
"kind": "security_manifest_written",
"message": "security manifest written",
"path": "/tmp/gowdk-distfix/docs-site/dist/.gowdk/reports/site/gowdk-security.json"

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 Remove local build paths from committed reports

Because dist/site is now checked in and served, this report publishes the build machine's /tmp/gowdk-distfix/... path and will churn every time another maintainer regenerates the site from a different checkout. Keep committed reports deterministic by recording a path relative to dist/site or omitting the private security-report path from the public build report.

Useful? React with 👍 / 👎.

Comment thread docs-site/README.md
`go.mod`. Use `go run ../cmd/gowdk ...` for compiler/build commands that
should run against the in-tree repository checkout.
`go.mod`. Build the in-tree CLI with
`(cd .. && go build -o docs-site/tools/gowdk ./cmd/gowdk)` before compiler

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 Create tools before building the local CLI

In a fresh checkout docs-site/tools/ is not present, and go build -o docs-site/tools/gowdk does not create missing parent directories, so the documented prereq/develop/build commands fail before ./tools/gowdk exists. Add mkdir -p docs-site/tools or use an existing ignored output path with this command.

Useful? React with 👍 / 👎.

Comment thread docs-site/.gitignore
Comment on lines +3 to +5
dist/*
!dist/site/
!dist/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 Re-apply secret ignores under dist/site

This broad unignore makes every file under the committed output tree trackable, overriding the repository-level ignores for .env, *.key, *.pem, logs, and similar files. When the documented build copies assets/. into dist/site/assets, an ignored local secret accidentally left in assets would be staged by git add docs-site/dist/site; re-ignore secret/local patterns after this exception or narrow the exception to the generated file set.

Useful? React with 👍 / 👎.

@cssbruno cssbruno merged commit a77dabd into main Jun 20, 2026
16 checks passed
@cssbruno cssbruno deleted the codex/docs-site-check-in-dist branch June 20, 2026 23:41
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