Skip to content

CI: publish DocC catalog to GitHub Pages on merge to master#43

Merged
itsniper merged 2 commits into
masterfrom
claude/33-ci-publish-docc-hy7jv6
Jul 15, 2026
Merged

CI: publish DocC catalog to GitHub Pages on merge to master#43
itsniper merged 2 commits into
masterfrom
claude/33-ci-publish-docc-hy7jv6

Conversation

@itsniper

Copy link
Copy Markdown
Member

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)

  • Publish on push/merge to master only — PRs still validate but do not deploy.
  • Option A with modern deploy mechanicsactions/upload-pages-artifact + actions/deploy-pages.
  • Remove the PR docs artifactReliaBLE-docs.zip upload is gone.
  • Update README.md with the stable documentation link.

Changes

  • .github/workflows/ci.yml
    • DocC build now uses static-hosting flags (--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.
    • New deploy-docs job uploads the Pages artifact and deploys via actions/deploy-pages@v4, gated to push on master (if: github.ref == 'refs/heads/master').
    • Removed the per-PR ReliaBLE-docs.zip archive + upload-artifact steps.
    • Least-privilege permissions: contents: read at the workflow level; the deploy job elevates to pages: write / id-token: write and targets the github-pages environment.
  • 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)

  • Landing: https://five3apps.github.io/ReliaBLE/documentation/reliable/
  • Getting Started: https://five3apps.github.io/ReliaBLE/documentation/reliable/gettingstarted

PR 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 via swift package generate-documentation (noted in the README). No per-PR preview deploys.

⚠️ One-time repo setting required

The modern deploy mechanics require Settings → Pages → Build and deployment → Source = "GitHub Actions" to be enabled once for the repo. The deploy-docs job 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-plugin static-hosting flags from Apple's publishing guide.

🤖 Generated with Claude Code


Generated by Claude Code

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 itsniper left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor README cleanup

Comment thread README.md Outdated
## Documentation

- Getting Started [TODO DOC LINK: Add link once doc site is up]
Full API documentation is published from `master` to GitHub Pages:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md Outdated
- [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`.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@itsniper itsniper merged commit 95bc055 into master Jul 15, 2026
2 checks passed
@itsniper itsniper deleted the claude/33-ci-publish-docc-hy7jv6 branch July 15, 2026 02:01
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.

CI: Publish DocC catalog to hosted documentation site

2 participants