Repository navigation
chore: move public docs website from private tools submodule - #119
Merged
Merged
Conversation
blimmer
marked this pull request as draft
May 14, 2026 16:37
blimmer
force-pushed
the
chore/website-into-public-packages
branch
from
May 14, 2026 17:53
07885bc to
635edb4
Compare
Removes the projen-generated infrastructure (`.projen/`, the `auto-approve` workflow, the CODEOWNERS / .gitattributes / .gitignore banners, the dependabot ignore for the projen-pinned app-token action) and the `tools/` private-submodule wiring (`.gitmodules`, init script, `just/infra.just`, the `tools-init` / `tools-install` justfile recipes and the `install` recipe's submodule refresh, `package.json` lint patterns and `synth:projen` script, the `.codex` rule allowlisting `bun run projen`, and the `bootstrap-tools` composite action). The marketing site has been the only reason the public repo needed any of this; the next commit reintroduces it as a regular public workspace under `packages/website` and the references across the tree get updated to match.
Move the Astro + Starlight marketing/docs site out of the private `planbridge-private` tools submodule and into this repository as a regular `@contextbridge/website` workspace package, so public contributors can change copy, docs, and components without any submodule setup. Wires the new path through the rest of the tree: - root `test` script dispatches `packages/website` test (astro check + build); root `website` justfile recipe runs the new package's dev server. - `eslint`/`.prettierignore`/`.gitignore` ignore Astro's `.astro/` output and the generated `src/content/docs/cli/` reference (still produced from Commander definitions by `packages/cli/scripts/genCliRef.ts`, just emitted into the new path). - `packages/annotation/scripts/recordDemo.ts` writes the homepage demo asset into `packages/website/public/demo/`. - AGENTS.md, CONTRIBUTING.md, claude rules, and package READMEs are refreshed to describe the new layout. Refs #99.
After the `release` job tags a new version, build `packages/website`, sync it to the marketing-site S3 bucket, and invalidate the CloudFront distribution. Gated on `!contains(github.ref_name, '-')` so alpha/pre-release tags don't publish unreleased docs ahead of a stable CLI release. Assumes a new OIDC role (defined in private infrastructure) plus two GitHub repository variables: - `vars.WEBSITE_BUCKET` - `vars.WEBSITE_DISTRIBUTION_ID` And the secret `secrets.WEBSITE_DEPLOY_ROLE_ARN`. Fingerprinted assets under `_astro/` get a 1-year immutable cache; everything else gets a 5-minute revalidating cache to keep HTML/markdown fresh. Closes #99.
Brings in two changes Donnie landed in the private repo while the public website workspace was being set up: - Refresh homepage/marketing positioning around inline comments on coding agent plans (hero, FAQ, demo caption, FAQ nav, trust copy, OG card restyle, llms.txt, metadata). - Document the default ephemeral PlanBridge browser UI port plus `CONTEXTBRIDGE_PORT` and `contextbridge plan --port` for fixed-port flows. Originally landed as planbridge-private#17 and planbridge-private#18.
Astro 6 requires Node >=22.12.0, but the GitHub Actions runner's preinstalled Node 20 was being picked up by `astro check` / `astro build` through the binary shebang, failing the website typecheck on CI. The bootstrap action installs anything in .tool-versions via asdf, so listing nodejs here pins it in CI and locally.
Factor the S3 sync + CloudFront invalidation out of release.yml into a workflow_call entrypoint so the main branch can deploy on website-only changes without going through a release. Both callers serialize through a `website-deploy` concurrency group to keep the S3 sync and invalidation from racing.
blimmer
force-pushed
the
chore/website-into-public-packages
branch
from
May 14, 2026 19:25
635edb4 to
1856700
Compare
Type-aware ESLint (tseslint.configs.recommendedTypeChecked from the base config) needs the TypeScript program to resolve `astro:content`, whose declarations Astro generates into `packages/website/.astro/types.d.ts` via `astro sync` (or as a side effect of dev/check/build). Locally those artifacts persist between runs; in CI lint runs before any astro command, so `defineCollection` resolved to `any` and `no-unsafe-call` / `no-unsafe-assignment` fired on content.config.ts. Add prelint hooks so the sync runs every time, matching CI to local.
Cleanup after the move out of the private submodule: - Delete `starlight-brand.config.mjs`. Orphaned scaffolding — `astro.config.mjs` never imported `starlightBrand`, so the file was silently dead. The styles it claimed to wire up still load via `main.css`'s @imports of `base.css` + `starlight.css`. - Drop the AGENTS.md mention of a `pretest` script that doesn't exist. The website's `test` script (`typecheck && build`) regenerates the CLI reference transitively through `pretypecheck` + `prebuild`, so behavior is unchanged — the docs were just lying about the mechanism. - Drop the AGENTS.md line claiming the package "does not depend on a private tools/ submodule." Useful during the migration; meaningless to future readers who never knew about the submodule. - Slim `packages/website/.gitignore` to just `.astro/` (the only entry not already covered by the repo-root `.gitignore`).
Extend the root format glob to .mdx so handwritten Starlight content is consistently formatted. The generated `docs/cli/` directory stays in .prettierignore to avoid churn against `genCliRef.ts`. Drop the stray `bun run --cwd packages/website test` from the "Run the website locally" section of CONTRIBUTING — `just website` already runs the dev server and is sufficient.
blimmer
commented
May 14, 2026
Contributor
Author
There was a problem hiding this comment.
This was old / from projen
| @@ -0,0 +1,72 @@ | |||
| name: Deploy Website | |||
Contributor
Author
There was a problem hiding this comment.
Reusable workflow used from main and release workflows
| @@ -1,2 +1,3 @@ | |||
| bun 1.3.13 | |||
| just 1.49.0 | |||
| nodejs 24.15.0 | |||
Contributor
Author
There was a problem hiding this comment.
astro check uses a shebang for node, so we need this, unfortunately. They explicitly call out bun as out of scope for check.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Moves the Astro + Starlight marketing/docs site out of the private
planbridge-privatetools submodule and into this repo as a regular@contextbridge/websiteworkspace underpackages/website, so public contributors can change the site without any submodule setup. Strips the projen-generated infrastructure that only existed to manage that submodule, and adds adeploy-websitejob to the release workflow that publishes the built site to S3 + CloudFront on stable releases only (alpha tags are skipped so unreleased docs do not publish before the corresponding CLI release).Review focus
vars.WEBSITE_BUCKET,vars.WEBSITE_DISTRIBUTION_ID, andsecrets.WEBSITE_DEPLOY_ROLE_ARN. The OIDC role is defined in private infrastructure (per chore: move public docs website from private tools submodule #99) and must exist before the next stable release tag, otherwise the new job will fail. The job runs only when!contains(github.ref_name, '-')— worth double-checking that matches how release tags are shaped._astro/*getspublic, max-age=31536000, immutable(fingerprinted assets), everything else getspublic, max-age=300, must-revalidate. Invalidation hits/*regardless, so the immutable cache only matters for in-flight clients between deploys.packages/website/src/content/docs/cli/reference is gitignored. It is regenerated by Astro lifecycle hooks (predev/prebuild/pretypecheck) frompackages/cli/scripts/genCliRef.ts. The path move is also reflected inpackages/annotation/scripts/recordDemo.ts(homepage demo asset output).actions/create-github-app-tokenignore was projen-specific and is dropped — dependabot will resume managing that pin directly.Commits
44d35c1— chore: drop projen + private tools submodule plumbingaf314cb— feat(website): add public packages/website workspace (chore: move public docs website from private tools submodule #99)07885bc— ci(release): deploy website to S3/CloudFront on stable releaseCloses #99.