Skip to content

feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build (#41)#190

Closed
ChrisonSimtian wants to merge 1 commit into
mainfrom
feature/41-docs-site-phase1
Closed

feat(docs): seed Docusaurus site at /site, deploy to docs.fallout.build (#41)#190
ChrisonSimtian wants to merge 1 commit into
mainfrom
feature/41-docs-site-phase1

Conversation

@ChrisonSimtian

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of #41 — Documentation site migration.

  • Stands up Docusaurus 3.10 in /site/, reading content from the existing ../docs/ tree (single source of truth — no fork).
  • Targets https://docs.fallout.build via Cloudflare Pages (GitHub Pages slot is held by the apex fallout.build).
  • Adds .github/workflows/docs-deploy.yml — builds and deploys on push to main when site/**, docs/**, or the workflow itself changes.
  • Touch-ups to 8 docs files for strict MDX 3 compile (HTML → MDX comments, drop two redundant {#anchor} IDs).

Full architectural notes — including why same-repo + /site folder, why Cloudflare Pages, and how the deploy step is the v13 CD-POC reference for ADR-0001 — are in the commit body (d697b15).

Manual setup required before the deploy job will succeed

The build half works on any push. The deploy half needs (one-time):

  1. Create Cloudflare Pages project named fallout-docs (Cloudflare dashboard).
  2. Repo secrets: CLOUDFLARE_API_TOKEN (Pages:Edit), CLOUDFLARE_ACCOUNT_ID.
  3. DNS on fallout.build: CNAME docsfallout-docs.pages.dev.
  4. Cloudflare Pages project → Custom domains → add docs.fallout.build.

If we merge before these are wired up, the workflow will run on push to main and fail at the deploy step. Two options:

  • Wire Cloudflare setup first, then merge — deploy succeeds on the merge commit.
  • Merge now, accept one red docs-deploy run, then wire Cloudflare and re-run.

Explicit non-goals (follow-up PRs)

  • Custom favicon/logo (Docusaurus default placeholder retained).
  • Algolia DocSearch wiring (requires OSS-plan application).
  • Cleaning up broken-link warnings from numbered-prefix paths (onBrokenLinks: 'warn' keeps CI green).
  • Per-PR preview deploys.

Test plan

  • CI green on ubuntu-latest (the only PR-gating runner).
  • cd site && npm ci && npm run build succeeds locally with the included package-lock.json.
  • After Cloudflare setup, post-merge docs-deploy run is green and https://docs.fallout.build serves the site.
  • Homepage at / renders; /docs/introduction resolves; navbar GitHub link works.

Closes part of #41 (Phase 1). Done-when checklist on #41 stays open — search, link audit, README link are follow-up.

…ld via Cloudflare Pages

Phase 1 of the documentation site migration (#41). Stands up Docusaurus
3.10 in /site/, configured to read from the existing ../docs/ tree as
its content source — no fork of doc content, single source of truth.

## What's in this PR

- **/site** — Docusaurus scaffold (TypeScript template) wired to:
  - read content from `../docs/` (path: '../docs')
  - serve at `/docs/*` (routeBasePath: '/docs')
  - render the Fallout homepage at `/`
  - target `https://docs.fallout.build` (production url)
- **/site/src/theme/MDXComponents.tsx** — globally registers Tabs,
  TabItem, CodeBlock, and Admonition so existing docs don't need to add
  explicit imports. Mirrors the NUKE site's behaviour.
- **/site/src/components/** — stub implementations of components the
  existing docs reference: AsciinemaPlayer (placeholder), DownloadButton,
  ControlKey, ToolConfirmation. Functional enough to build; visual
  polish is follow-up work.
- **.github/workflows/docs-deploy.yml** — builds /site and deploys to
  Cloudflare Pages on push to main when site/** or docs/** change.
- **.gitignore** — excludes site/node_modules, site/build, site/.docusaurus.
- **docs/** — minimal touch-ups to make the source compile under
  MDX 3 strictly:
  - HTML comments `<!-- ... -->` → MDX comments `{/* ... */}` in 8 files.
  - Removed two `{#anchor}` explicit IDs in introduction.md (slugs
    auto-generate from headings).

## Architectural choices

- **Same repo, /site folder.** docs/ is source-of-truth, /site is the
  builder. One PR cycle for both content and chrome.
- **Cloudflare Pages for the docs subdomain.** GitHub Pages' single-
  site-per-repo limit means we can't also serve docs.fallout.build from
  this repo via GH Pages (fallout.build apex already lives there).
  Cloudflare Pages handles the subdomain via a CNAME on fallout.build
  DNS pointing to the Pages project.
- **CD POC.** The deploy step (wrangler pages deploy) is the v13 CD
  reference point. The shape — build artifact, authenticated push to
  external system's API — is exactly what ADR-0001's "tasks → REST"
  pattern will eventually wrap. Kept minimal so it lifts cleanly into
  a Fallout primitive later.

## What's not in this PR

- Custom favicon / logo (Docusaurus default placeholder retained).
- Algolia DocSearch wiring (apply for OSS plan, follow-up PR).
- Cleanup of the broken-link warnings (numbered-prefix paths like
  /docs/01-getting-started/01-installation vs Docusaurus's stripped
  /docs/getting-started/installation). onBrokenLinks: 'warn' means CI
  still passes; content cleanup tracked as follow-up.
- Per-PR preview deploys.

## Manual setup needed (before deploy works)

1. Create Cloudflare Pages project named `fallout-docs` (one-time, via
   Cloudflare dashboard).
2. Add repo secrets:
   - `CLOUDFLARE_API_TOKEN` (Pages:Edit scope)
   - `CLOUDFLARE_ACCOUNT_ID`
3. Add DNS record on fallout.build: CNAME `docs` → `fallout-docs.pages.dev`.
4. In Cloudflare Pages project → Custom domains, add `docs.fallout.build`.

## Refs

- #41 (P7 — Documentation site migration)
- ADR-0001 (CD primitives — the deploy step is the v13 reference shape)
@ChrisonSimtian

Copy link
Copy Markdown
Collaborator Author

Closing — this approach was superseded after the branch was last touched.

The docs site is live at https://docs.fallout.build/, but via a different architecture:

  • Built and deployed from a sibling repo: ChrisonSimtian/Falloutdocs — holds Docusaurus config, theme, components, and the deploy workflow.
  • Markdown source-of-truth stays here in docs/. Falloutdocs' deploy workflow checks out both repos and reads markdown from ./fallout-source/docs.
  • Hosted on GitHub Pages (not Cloudflare Pages). The Fallout repo's Pages slot is taken by the apex fallout.build, so the sibling repo owns the docs subdomain — one custom domain per repo limit.
  • Triggers: push to Falloutdocs main, daily 02:00 UTC schedule (picks up Fallout docs/ changes within 24h), manual workflow_dispatch.

Nothing in this PR belongs on main:

Branch will be deleted. Follow-ups on #41 tracked in new issues.

@ChrisonSimtian
ChrisonSimtian deleted the feature/41-docs-site-phase1 branch May 26, 2026 08:29
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