Skip to content

ci: publish GitHub Pages preview of the catalog#13

Merged
oto-macenauer-absa merged 1 commit into
masterfrom
ci/github-pages
Jul 2, 2026
Merged

ci: publish GitHub Pages preview of the catalog#13
oto-macenauer-absa merged 1 commit into
masterfrom
ci/github-pages

Conversation

@oto-macenauer-absa

Copy link
Copy Markdown
Collaborator

Implements #9.

Adds .github/workflows/pages.yml — builds the catalog from apps.json and deploys a browsable preview to GitHub Pages on push to master (+ workflow_dispatch).

How it works

  • Standalone build (npm run build, non-headless) so the preview has the chrome nav bar + app switcher and is usable on its own — not the headless/web-fragment output.
  • Base already matches: the project-site URL https://absaoss.github.io/knowledge-base/ lines up with Astro's base: /knowledge-base, so links/assets resolve unchanged.
  • Fragment-prefix rewrite: static Pages has no gateway/nginx to rewrite /__wf/knowledge-base/*, and /__wf/* is outside the project-site mount. A post-build step rewrites /__wf/knowledge-base/ → /knowledge-base/ so the marketplace stylesheet resolves to dist/style.css. Verified: 0 /__wf/ refs remain; all referenced paths exist under the mount.
  • Hermetic: builds from the committed fixture registry — no GITHUB_TOKEN/network.
  • Actions SHA-pinned; permissions limited to the Pages OIDC deploy (pages: write, id-token: write).

Repo settings needed

configure-pages runs with enablement: true to turn Pages on automatically. If org policy blocks that, enable manually: Settings → Pages → Source: GitHub Actions. The github-pages environment may also need to allow deployments from master.

Notes

  • Deploys on merge to master (this PR won't deploy; it runs CI + PR-requirements only).
  • Registry: uses the committed fixture (user-guide + guide-mirror). Swap apps.json for real published apps to preview those instead.

Closes #9

🤖 Generated with Claude Code

Add a Pages workflow that builds the catalog (standalone/non-headless, so the
chrome nav + app switcher are present) from the committed apps.json and deploys
to GitHub Pages on push to master.

The project-site URL (…github.io/knowledge-base/) matches Astro's base
(/knowledge-base), so links resolve unchanged. A post-build step rewrites the
fragment asset prefix (/__wf/knowledge-base/ → /knowledge-base/) because static
Pages has no gateway/nginx to perform that rewrite and /__wf/* is outside the
project-site mount. Build is hermetic (vendored fixture — no token/network).
Actions are SHA-pinned; permissions limited to the Pages OIDC deploy.

Closes #9

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@oto-macenauer-absa oto-macenauer-absa merged commit e76fd25 into master Jul 2, 2026
5 checks passed
@oto-macenauer-absa oto-macenauer-absa deleted the ci/github-pages branch July 2, 2026 05:49
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.

Publish a GitHub Pages preview of the catalog (from apps.json)

1 participant