docs(infra): set up DocFX site with multi-version GitHub Pages deployment#17
docs(infra): set up DocFX site with multi-version GitHub Pages deployment#17
Conversation
…ment (POM-180) - Adds docs/ directory with DocFX configuration consuming all src/**/*.csproj - Adds skeleton placeholders for Concepts (4), Adapters (8), Getting Started, Roadmap - Adds top-level navigation toc.yml and ADR navigation toc.yml - Adds docs-deploy.yml workflow that builds on push main / release tag and publishes to gh-pages with versioned subdirectories (main/, vX.Y/, latest/), versions.json manifest, and a top-level redirect index.html - Permissions block scoped to contents:write only DocFX build verified locally: 0 errors. The single remaining warning is on the ADR template's placeholder [####](####.md) link, intentional. Site will be served at https://sassy-solutions.github.io/compendium/ once the workflow runs and Pages is activated on the gh-pages branch.
There was a problem hiding this comment.
Pull request overview
Sets up the initial DocFX documentation site for Compendium and automates multi-version publishing to GitHub Pages (preview from main, versioned releases, and a latest alias).
Changes:
- Added DocFX configuration and skeleton docs structure (home, getting started, concepts, adapters, ADRs, roadmap, API ref entry points).
- Introduced a GitHub Actions workflow to build DocFX docs and publish them to
gh-pagesunder versioned subdirectories. - Wired navigation TOCs for the main docs area, concepts, adapters, and ADRs.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/toc.yml | Root navigation for the documentation site |
| docs/roadmap.md | Roadmap placeholder page (optionally inlined from root ROADMAP.md during CI) |
| docs/index.md | Landing page content for the docs site |
| docs/images/.gitkeep | Ensures docs/images/ exists in the repo |
| docs/getting-started.md | Getting started placeholder page |
| docs/docfx.json | DocFX metadata + build configuration for site and API docs |
| docs/concepts/toc.yml | Concepts section navigation |
| docs/concepts/result-pattern.md | Concepts placeholder page |
| docs/concepts/multi-tenancy.md | Concepts placeholder page |
| docs/concepts/hexagonal-architecture.md | Concepts placeholder page |
| docs/concepts/event-sourcing.md | Concepts placeholder page |
| docs/adr/toc.yml | ADR section navigation wiring existing ADRs |
| docs/adapters/zitadel.md | Adapter placeholder page |
| docs/adapters/toc.yml | Adapters section navigation |
| docs/adapters/stripe.md | Adapter placeholder page |
| docs/adapters/redis.md | Adapter placeholder page |
| docs/adapters/postgresql.md | Adapter placeholder page |
| docs/adapters/openrouter.md | Adapter placeholder page |
| docs/adapters/listmonk.md | Adapter placeholder page |
| docs/adapters/lemonsqueezy.md | Adapter placeholder page |
| docs/adapters/aspnetcore.md | Adapter placeholder page |
| docs/.gitignore | Ignores generated DocFX outputs (_site, api, obj, etc.) |
| .github/workflows/docs-deploy.yml | Builds DocFX docs and deploys to gh-pages with main/, vX.Y/, latest/, and manifest/redirect files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "src": "../src", | ||
| "exclude": ["**/Compendium.Adapters.Shared.csproj"] |
There was a problem hiding this comment.
exclude removes Compendium.Adapters.Shared.csproj from API metadata generation, but that project currently does not opt out of packing (no <IsPackable>false</IsPackable>), so it looks like a public package that will end up undocumented. Either include it in DocFX metadata, or explicitly mark the project as non-packable/internal so the exclusion matches the project intent.
| "src": "../src", | |
| "exclude": ["**/Compendium.Adapters.Shared.csproj"] | |
| "src": "../src" |
| "_appLogoPath": "images/logo.svg", | ||
| "_appFaviconPath": "images/favicon.ico", |
There was a problem hiding this comment.
_appLogoPath/_appFaviconPath point to images/logo.svg and images/favicon.ico, but docs/images/ currently only contains .gitkeep. This will produce broken assets in the generated site (and may cause template warnings). Add the referenced files (even placeholders) or remove/adjust these metadata values.
| "_appLogoPath": "images/logo.svg", | |
| "_appFaviconPath": "images/favicon.ico", |
| "disableGitFeatures": false, | ||
| "sitemap": { | ||
| "baseUrl": "https://sassy-solutions.github.io/compendium/", | ||
| "priority": 0.5, | ||
| "changefreq": "weekly" | ||
| } |
There was a problem hiding this comment.
DocFX sitemap baseUrl is set to https://sassy-solutions.github.io/compendium/, but this workflow deploys the site under versioned subpaths like /main/ and /vX.Y/. As a result, generated sitemap URLs will not match the actual published URLs. Consider setting baseUrl dynamically per deploy target (e.g., replace during workflow) or disabling sitemap generation until a per-version base URL is supported.
| "disableGitFeatures": false, | |
| "sitemap": { | |
| "baseUrl": "https://sassy-solutions.github.io/compendium/", | |
| "priority": 0.5, | |
| "changefreq": "weekly" | |
| } | |
| "disableGitFeatures": false |
| run: dotnet restore Compendium.sln | ||
|
|
||
| - name: Install DocFX | ||
| run: dotnet tool install -g docfx |
There was a problem hiding this comment.
The workflow installs DocFX without pinning a version. Since the PR was validated against DocFX 2.78.5, using whatever the current latest tool is can introduce unexpected build breaks or output changes. Pin the tool version (e.g., dotnet tool install -g docfx --version <tested-version>) to make deployments reproducible.
| run: dotnet tool install -g docfx | |
| run: dotnet tool install -g docfx --version 2.78.5 |
## Summary PR #23 incorrectly bumped CHANGELOG to `[1.0.0-preview.2] - 2026-04-26` with the quality-sweep entries — but tag `v1.0.0-preview.2` was already cut on **2026-04-25** from a different commit set (PRs #1-7) and **already published to nuget.org** (`Compendium.Core 1.0.0-preview.2` is live). Reusing that version was a mistake. This PR reconciles the CHANGELOG with the published reality and rolls today's work into a new **preview.3**: ### `[1.0.0-preview.2] - 2026-04-25` — rewritten retroactively Now matches the auto-generated GitHub release notes for `v1.0.0-preview.2`: - **Added** — `Compendium.Adapters.Shared` (PII masking utilities, introduced in #3). - **Changed** — Dependabot bumps #4-7, OSS governance scaffolding. - **Security** — workflow `permissions:` block (#1), tenant log sanitization (#2), email removal from adapter logs / GDPR (#3). ### `[1.0.0-preview.3] - 2026-04-26` — new Everything since `v1.0.0-preview.2`: - **Added** — DocFX site (#17), 5 ADRs (#14), public ROADMAP (#15), getting-started guide (#20), 4 concept pages (#21), 8 adapter how-to guides (#22). - **Changed** — CodeQL Default Setup → `extended` query suite. - **Security** — `softprops/action-gh-release` pinned to commit SHA (#16, alert #28 closed). ## Test plan - [ ] CI green on this PR. - [ ] After merge, tag `v1.0.0-preview.3` triggers Release workflow successfully. - [ ] `Compendium.* @ 1.0.0-preview.3` published on nuget.org. - [ ] GitHub Release `v1.0.0-preview.3` created with auto-generated notes. VK: POM-186 (Code Quality sweep parent). Co-authored-by: sacha <sacha@scojhconsult.com>
Summary
Stands up the documentation infrastructure for Compendium. Closes POM-180.
docs/consuming allsrc/**/*.csproj(excludingCompendium.Adapters.Sharedper itsIsPackable=falsestatus).docs-deploy.yml) that builds onpush mainand onreleasepublished, publishing to agh-pagesbranch with versioned subdirectories:gh-pages/main/— preview from maingh-pages/v<MAJOR>.<MINOR>/— release versionsgh-pages/latest/— alias of newest releasegh-pages/versions.json— manifest for any future version switchergh-pages/index.html— root redirect (latest > main fallback)docs/adr/toc.yml) wires up the 5 ADRs already merged via POM-185.ROADMAP.mdautomatically when present (works after POM-181 merges).Validation
DocFX build verified locally with
docfx 2.78.5:The remaining warning is on the ADR template's placeholder
[####](####.md)link from POM-185 — intentional template syntax.API reference is generated from the existing XML docs (
<GenerateDocumentationFile>true</GenerateDocumentationFile>fromDirectory.Build.props).Post-merge actions
Deploy Docsworkflow runs on push to main → createsgh-pagesbranch on first run.gh-pagesbranch:https://sassy-solutions.github.io/compendium/main/(with root redirect fromhttps://sassy-solutions.github.io/compendium/).Test plan
docfx metadata docs/docfx.jsonsucceeds locallydocfx build docs/docfx.jsonsucceeds locally (0 errors)_site/api/https://sassy-solutions.github.io/compendium/main/returns 200Notes
contents: writeonly — nopages:writesince we publish via the gh-pages branch, not viaactions/deploy-pages).cancel-in-progress: falseso two simultaneous deploys queue rather than collide.