Commit e76fd25
authored
ci: publish GitHub Pages preview of the catalog (#13)
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](https://claude.com/claude-code)1 file changed
Lines changed: 71 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
0 commit comments