CI: publish DocC catalog to GitHub Pages on merge to master#43
Merged
Conversation
Implements #33. Publish the rendered ReliaBLE DocC catalog to a stable, browsable GitHub Pages URL instead of a per-PR zip artifact. - Build DocC with static-hosting flags (--transform-for-static-hosting, --hosting-base-path ReliaBLE, --disable-indexing). The build still runs on every PR with --warnings-as-errors, preserving the DocC gate from #32. - Upload the Pages artifact and deploy via actions/upload-pages-artifact + actions/deploy-pages (modern GitHub Pages deploy mechanics), gated to pushes on master only. - Remove the per-PR ReliaBLE-docs.zip artifact upload. - Scope permissions least-privilege at the workflow level; the deploy job elevates pages/id-token. - Link the hosted docs (and a local build note) from README.md, replacing the TODO placeholder. PR preview strategy: PRs validate the catalog via the CI gate; local preview is via `swift package generate-documentation`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U78GaqPWrWJCwYGqo1ZdNu
itsniper
commented
Jul 15, 2026
| ## Documentation | ||
|
|
||
| - Getting Started [TODO DOC LINK: Add link once doc site is up] | ||
| Full API documentation is published from `master` to GitHub Pages: |
Member
Author
There was a problem hiding this comment.
We don't need this in README. Maybe later once there's a "Contribution" section that explains how the project itself works. For now let's stick with just the links.
| - [ReliaBLE Documentation](https://five3apps.github.io/ReliaBLE/documentation/reliable/) | ||
| - [Getting Started](https://five3apps.github.io/ReliaBLE/documentation/reliable/gettingstarted) | ||
|
|
||
| To build the documentation locally, run `swift package generate-documentation`. |
Member
Author
There was a problem hiding this comment.
We don't need this in README. Maybe later once there's a "Contribution" section that explains how the project itself works. For now let's stick with just the links.
Address PR review: drop the "published from master" intro and the local build note; keep only the hosted documentation links for now. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U78GaqPWrWJCwYGqo1ZdNu
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.
Closes #33.
Publishes the rendered ReliaBLE DocC catalog to a stable, browsable GitHub Pages URL instead of a per-PR zip artifact.
Decisions implemented (per issue comment)
masteronly — PRs still validate but do not deploy.actions/upload-pages-artifact+actions/deploy-pages.ReliaBLE-docs.zipupload is gone.README.mdwith the stable documentation link.Changes
.github/workflows/ci.yml--transform-for-static-hosting,--hosting-base-path ReliaBLE,--disable-indexing). This same build keeps--warnings-as-errors, so the DocC validation gate from CI: Build DocC catalog on every PR (#22) #32 still runs on every PR — the extra flags only shape the output, they don't weaken validation.deploy-docsjob uploads the Pages artifact and deploys viaactions/deploy-pages@v4, gated topushonmaster(if: github.ref == 'refs/heads/master').ReliaBLE-docs.ziparchive +upload-artifactsteps.permissions: contents: readat the workflow level; the deploy job elevates topages: write/id-token: writeand targets thegithub-pagesenvironment.README.md— replaced the[TODO DOC LINK]placeholder with links to the hosted docs and a local-build note.Hosted URLs (live after first merge to
master)https://five3apps.github.io/ReliaBLE/documentation/reliable/https://five3apps.github.io/ReliaBLE/documentation/reliable/gettingstartedPR preview strategy (acceptance criterion)
Per the decision to drop PR artifacts: PRs are covered by the DocC validation gate (
--warnings-as-errors), and local preview is viaswift package generate-documentation(noted in the README). No per-PR preview deploys.The modern deploy mechanics require Settings → Pages → Build and deployment → Source = "GitHub Actions" to be enabled once for the repo. The
deploy-docsjob will fail until that source is set. No secrets are needed.Testing notes
Swift/Xcode isn't available in this environment, so the DocC build wasn't run locally; validation happens in CI on macOS. The workflow YAML was syntax-checked, and the added flags are the standard
swift-docc-pluginstatic-hosting flags from Apple's publishing guide.🤖 Generated with Claude Code
Generated by Claude Code