# Docs site (playground) Docker image + install page ## Goal Publish the Storybook playground as a static "docs" site, package it as a Docker image (`nychthemeron-docs`), and add an Installation page documenting how to install `@nychthemeron/library` from the private Forgejo npm registry via npm, pnpm, yarn, and bun. ## Install page - New file: `packages/playground/stories/Install.mdx` - Storybook addon-docs MDX page (no story export), `Meta` title `Get Started/Installation` so it sorts near the top of the sidebar. - Content: - Heading + short description of the library. - Registry config snippet (`.npmrc`) showing how to point the scoped `@nychthemeron` registry at `https://git.mcpeakdev.com/api/packages/mcpeakdev/npm/`. - Four code blocks showing install commands for `@nychthemeron/library`: npm, pnpm, yarn, bun. ## Docker image (`nychthemeron-docs`) - New file: `packages/playground/Dockerfile`, multi-stage build: - **Stage 1 (`oven/bun:1`)**: copy the workspace, `bun install --frozen-lockfile`, build `@nychthemeron/library` (`cd packages/library && bun run build`), then build Storybook (`cd packages/playground && bun run build` → `packages/playground/storybook-static`). - **Stage 2 (`nginx:alpine`)**: copy `storybook-static` into `/usr/share/nginx/html`, default nginx config, `EXPOSE 80`. - Build context is the repo root (so the workspace lockfile and all packages are available to stage 1). ## CI changes In `.forgejo/workflows/ci.yml`, add a new `publish-docs` job: - Parallel to the existing `publish` job (both depend on `build`). - Gated on `startsWith(github.ref, 'refs/tags/v')`. - Steps: 1. Checkout 2. Log in to `git.mcpeakdev.com` using `docker/login-action` with `secrets.FORGEJO_TOKEN` (same credential as the library publish job). 3. Extract version from tag (`${GITHUB_REF_NAME#v}`). 4. `docker/build-push-action` with context `.`, dockerfile `packages/playground/Dockerfile`, push `true`, tags: - `git.mcpeakdev.com/mcpeakdev/nychthemeron-docs:` - `git.mcpeakdev.com/mcpeakdev/nychthemeron-docs:latest` ## Out of scope - No changes to the existing `build` or `publish` (npm) jobs beyond what's already in place. - No SPA routing / custom nginx config — Storybook's static output is served as-is.