Repository navigation
Description
Relocated from dezren39/darwin-nix#118 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).
Parent: #90
Summary
Build the docs site in CI and publish it to GitHub Pages: pull requests build only, and pushes to main deploy. The build has to produce the mcpx binary first, because the reference pages are generated from it. The real decision is where the built site is published, because dezren39/nix is the whole nix-config monorepo and GitHub allows one Pages site per repository.
Original notes
- documentation
- make a book using whatever is the most common and simple modern choice
- github static setup. separately, assign a subdomain
("separately, assign a subdomain" is #119.)
Current state
dezren39/nixis public and has no Pages site:gh api repos/dezren39/nix/pagesreturns 404.- The user site
dezren39/dezren39.github.iois published from a branch (build_type: legacy,master/) with custom domainwww.drewrypope.comand HTTPS enforced. So a project site fromdezren39/nixwould appear athttps://www.drewrypope.com/nix/unless it gets its own custom domain (Update github.com/tursodatabase/libsql-client-go digest to 9d5d30a #119). github.com/dezren39/mcpxis the Go module path, but that repository does not exist (gh api repos/dezren39/mcpxreturns 404).- CI:
.github/workflows/mcpx.ymlruns on PRs touchingpkgs/mcpx/**,flake.nix,flake.lockor itself, and on pushes tomaintouchingpkgs/mcpx/**.- It installs Nix (
DeterminateSystems/nix-installer-action), Go, Deno, Bun and Node, runsgo test ./..., and repairsvendorHashon bot branches. - Its permissions are
contents: write,pull-requests: read. - The only other workflow is
opencode.yml.
package.nixpostInstall already runs the built binary ($out/bin/mcpx man,mcpx completion ...). A docs derivation can do the same withmcpxas a build input.
What the build must do (any approach)
- Build
mcpx, then run it to emit the generated reference pages (🎨 Palette: Improve accessibility of editor search panel #144 / ⚡ Bolt: Optimize cursor color generation and position grouping #145): settings, commands, OpenAPI, tool types. The docs can then never describe a binary other than the one built from the same commit. - Run the generator chosen in chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117, plus the history renderer (⚡ Bolt: Optimize ProseMirror decoration widget rendering #151) and the agent twin (Update module github.com/jackc/pgx/v5 to v5.9.2 [SECURITY] #120).
- Bake in the base URL. The site root is
/with a custom domain and/nix/without one. Take it as a derivation argument so a local build and a CI build differ only in that value.
Nix or setup-* actions. Recommended: nix build .#mcpx-docs, a flake output that depends on .#mcpx. It is the same build locally and in CI, it is covered by #49's "build every output" job for free, and the generator version is pinned by flake.lock. The alternative is setup-go plus a generator action. That is faster on a cold runner but drifts from the local build, and it duplicates the pinning. Mitigate Nix's cold-start cost with a Nix store cache (cachix, or the Actions cache via nix-community/cache-nix-action), as #49 proposes for all packages.
Triggers and path filters.
- Deploy on push to
maintouchingpkgs/mcpx/**,flake.lock(a generator or nixpkgs bump) or the workflow file. - On PRs with the same paths: build only, upload the site as an ordinary artifact, and run the docs checks.
- Also run on
workflow_dispatch, for redeploys. - Use a
concurrency: { group: pages, cancel-in-progress: false }group so two deploys cannot interleave.
A separate workflow file (mcpx-docs.yml) rather than a job in mcpx.yml. A Pages deploy needs pages: write and id-token: write plus the github-pages environment. mcpx.yml needs contents: write to push hash fixes. Keeping the two apart keeps each job's token minimal.
PR previews. GitHub Pages has no native PR previews. The options, cheapest first:
- None. Reviewers download the PR's build artifact and open it locally, e.g. with
nix run .#mcpx-docs-serve, a tiny static server. Recommended to start with. rossjrw/pr-preview-actionorkoizuka/pr-preview-action. These only work when Pages is deployed from a branch, so they are incompatible with Approach C below.- A separate preview repository (e.g.
EndBug/pages-preview) with its own Pages site. It needs a PAT, and the previews live at a different base URL. - An external host with previews (Cloudflare Pages, Netlify). That adds a service and an account.
Docs checks (links, generated pages current, agent twin in sync) run in CI; see the testing trackers under #91 (CI pipeline #95, integration/environments #97).
Approaches: where the built site is published
Approach A (least recommended): a gh-pages branch in dezren39/nix, pushed by CI
This is the classic setup, and the one most PR-preview actions assume.
Why not:
- It commits generated HTML into the config monorepo on every docs change, so the branch grows forever and the history fills with bot commits.
- The workflow needs
contents: writeon this repository in order to push. - It is GitHub's "legacy" publishing mode.
- The only thing it buys is option 2 of the PR previews above. That is not worth a permanently growing branch in a repository whose clones every machine pulls.
Approach B (middle): push the built site to a separate repository
For example dezren39/mcpx-docs, with its own Pages site and custom domain.
- It keeps generated output out of the monorepo, allows several docs sites (one per package) without the one-site-per-repo limit, and a separate preview repository becomes natural.
- Costs: a PAT or deploy key stored as a secret in
dezren39/nix, a second repository to keep alive, and a history of generated commits there instead. - Do not use
dezren39/mcpxfor this. That name is the Go module path. If mcpx ever gets its own repository (so thatgo install github.com/dezren39/mcpx/cmd/mcpx@latestworks), that repository must hold the code. If the code moves there, its docs should move with it and Approach C applies in that repository.
Approach C (recommended): the Actions artifact deploy from dezren39/nix, with its own custom domain
- Set the Pages source to "GitHub Actions" (
gh api repos/dezren39/nix/pages -X POST -f build_type=workflow). - The workflow builds
.#mcpx-docs, then runsactions/upload-pages-artifactfollowed byactions/deploy-pagesin thegithub-pagesenvironment. - No generated file is ever committed anywhere, and no extra repository or secret is needed.
- It is GitHub's current recommended mode. It also means a
CNAMEfile is ignored and not needed: the custom domain is a repository setting (GitHub docs). See Update github.com/tursodatabase/libsql-client-go digest to 9d5d30a #119. - The
github-pagesenvironment's default protection only allows deploys from the default branch, which is what we want.
Limits:
- One site per repository. If other flake packages later want docs, they share this site under subpaths, which is the open question in chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117.
- No branch-based PR previews (options 1, 3 and 4 still work).
Open questions
- One site for the whole monorepo with mcpx at the root, or an mcpx-only site? This decides whether a second package's docs would push towards Approach B.
- Deploy on every
mainpush touching mcpx, or only on release tags once amd host fails at evaluation: no outputHashes for p2panda-core-0.7.1 #158 exists? The install page must not document a channel before it is live, so release-gated deploys (or at least release-gated install instructions) may be needed. - Is the Nix cold-start time acceptable for a docs deploy? Measure with
gh run view --logon the first runs, and compare withmcpx.ymltimings. - Should the docs build be required on
maintogether with the mcpx build (build(deps): bump build/buck/preludes/buck2-prelude fromd956689to3cfc766#49 proposes making the mcpx check required)?
Ease · Impact · Related
Ease M (workflow + flake output; most of the effort is the flake output that runs mcpx to generate pages) · Impact high (nothing is public without it) · Depends on / related: #117 (generator), #119 (domain), #120, #144, #145, #151, #158, #49
Security/auth deferred; see tracker.
Activity
developing-today commentedon Oct 28, 2026
CODE-866
dezren39 commentedon Oct 28, 2026
History carried over from dezren39/darwin-nix#118 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:20:15Z
Integration pass. Placed in the DAG rooted at #181.
d956689to222dd7f#90 (site platform)dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 29, 2026
Triage verdict — task 2836 (2026-10-29)
Rescoped to developing-today/code. This issue was written for dezren39/nix (its "one Pages site per repository" problem, the
dezren39/nixPages facts, the user-site conflict) and relocated with the mcpx re-home. Those facts do not carry over; the verified code-repo facts are:gh api repos/developing-today/code/pagesreturns 404 (checked this shift). Approach C's Actions source is free to claim; nothing existing is displaced..github/workflows/on current main hasmcpx.ymlandmcpx-nixbuild.yml(build/test) but no docs or Pages workflow.Approach confirmed: C (the issue's recommendation) — a separate
mcpx-docs.yml: PRs build.#mcpx-docsonly and upload the site as a build artifact; pushes tomainandworkflow_dispatchdeploy viaactions/upload-pages-artifact+actions/deploy-pagesin thegithub-pagesenvironment, with onlypages: write+id-token: write, under apagesconcurrency group (cancel-in-progress: false). No PR previews to start, per the issue. The custom domain/subdomain is a separate sibling issue and stays out.Gate: this work needs
.#mcpx-docsto exist. The generator decision landed today on #1939 (mdBook, Approach C; triage task 2834) and the book skeleton is queue task 3236. Implementation follow-up enqueued as queue task 3242 with the gate stated in its body — a worker claiming it before 3236 lands parks with that dependency named.Verification for the follow-up: a PR run of the new workflow builds
.#mcpx-docsand uploads the artifact; post-merge, aworkflow_dispatchrun deploys and the Pages URL serves the book index.dezren39 commentedon Oct 29, 2026
🤖 Agent note · done
68 remaining items
dezren39 commentedon Oct 30, 2026
🤖 Agent note · picked up
.#mcpx-docson PRs, deploy to GitHub Pages via Actions on main) per the rescope in task 2836. Gate re-checked fresh: dependency task 3236 is DONE (PR docs(mcpx): stand up the mdBook book and .#mcpx-docs flake output (#1939) #2629 merged;mcpx-docs = mcpxDocspresent at lib/default.nix:587 on main) — gate satisfied, proceeding..github/workflows/mcpx-docs.ymlPR opened/merged with the specified triggers, permissions, and Pages deploy jobs; Pages source set to GitHub Actions.queue/3242-1941-mcpx-docs-ci(to be created on the laptop fleet worktree)ci(mcpx): bake base URL as the mcpx-docs derivation argument (siteUrl, …
ci(mcpx): deploy the book with siteUrl /code/ — the project Pages pat…
ci(mcpx): build docs in CI and deploy to GitHub Pages (#1941) (#2721)
dezren39 commentedon Oct 30, 2026
🤖 Agent note · done
1a7a1b37):.github/workflows/mcpx-docs.ymlbuilds.#mcpx-docson PRs touchingpkgs/mcpx/**,flake.nix/flake.lockor the workflow (site uploaded as themcpx-docs-siteartifact, no previews) and deploys to GitHub Pages from main/dispatch (separate deploy job,pagesconcurrency group with cancel-in-progress: false,github-pagesenvironment, permissionspages: write+id-token: write). Pages source was already set to GitHub Actions (build_type=workflow, verified via API this run).pkgs/mcpx/docs.nixnow takes asiteUrlderivation argument baked in as mdBook's site-url (default/); the deploy job overrides it to/code/(the project site's path — Codex P2: with/the generated 404 page's assets break; verified the overridden build on the laptop, 404.html references/code/).