Skip to content

docs: add the docs site publishing to packs.nebari.dev#41

Merged
dcmcand merged 5 commits into
mainfrom
feat/docs-site
Jul 3, 2026
Merged

docs: add the docs site publishing to packs.nebari.dev#41
dcmcand merged 5 commits into
mainfrom
feat/docs-site

Conversation

@dcmcand

@dcmcand dcmcand commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

What this is

Adds the Nebari Frames docs site: an Astro + Starlight site under docs/site, built on the shared @nebari/starlight theme (matching the wiring in software-pack-dashboard) so it looks and behaves like the rest of the Nebari Software Packs docs.

Content is seeded from the repo itself, not written from scratch: the README, Makefile comments, chart/values.yaml, and the .github/workflows/*.yml files. It covers publishing and browsing a Frame with the CLI, installing on a Nebari cluster (prerequisites, the nebari.dev/managed namespace label, the three auth modes, NebariApp integration, an ArgoCD pointer), the two local dev loops, a values reference organized by area, the architecture and auth flow, CI/CD and how to cut a release, and troubleshooting for the two OIDC-provisioning failure modes an operator is most likely to hit.

Layout

  • Documentation: Quickstart, Installation, Local Development, Troubleshooting
  • Reference: Configuration, Architecture, CLI Reference, CI/CD and Releasing

Pagefind search and the light/dark theme toggle are Starlight defaults and are left enabled. The header's GitHub link points at this repo; the shared theme plugin always adds its own org-level GitHub link first, so the header's SocialIcons component is overridden to drop that default once a repo-specific link is configured (see the comment in docs/site/astro.config.mjs).

CLI reference (generated)

tools/docs-gen walks the frames CLI's cobra command tree (cli/cmd.NewRootCmd) with spf13/cobra/doc and writes one Markdown page per command into docs/site/src/content/docs/reference/cli, with Starlight frontmatter added since cobra/doc does not produce any. Output is deterministic (cobra's date-stamped auto-gen footer is disabled) and is committed, so the site builds without needing Go. Regenerate after CLI changes with go run ./tools/docs-gen from the repo root, then commit the result.

Deploy mechanics

.github/workflows/docs.yml builds the site and deploys it to Cloudflare Pages, modeled on nebari-llm-serving-pack's docs workflow (its Playwright/mermaid and link-check steps are omitted since this project has neither):

  • Runs on push to main and on pull requests touching docs/**, tools/docs-gen/**, or the workflow file.
  • SITE/BASE are computed per ref: main builds for https://packs.nebari.dev at /nebari-frames/; PR builds use a per-branch Pages alias at /.
  • Deploys with cloudflare/wrangler-action@v3 to the nebari-frames Pages project, skipped for fork PRs (no secret access), with a PR comment linking the preview.

Verification

  • npm ci && SITE=https://packs.nebari.dev BASE=/nebari-frames/ npm run build succeeds; dist/ contains pagefind/ and all expected pages.
  • go run ./tools/docs-gen run twice in a row produces no diff.
  • go build ./..., go vet ./..., and golangci-lint run are clean.
  • actionlint on .github/workflows/docs.yml exits 0.

Ops checklist (not in this PR)

  • Create the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets. The workflow's build and lint gates run without them; only the deploy step needs them.
  • After the first successful deploy, set docs_site: true in pack-metadata.yaml and update links.docs to https://packs.nebari.dev/nebari-frames/, matching the convention in nebari-llm-serving-pack.

Closes #24, part of #35.

dcmcand added 3 commits July 3, 2026 16:08
Adds an Astro/Starlight docs site under docs/site, using the shared
@nebari/starlight theme (matching the wiring in software-pack-dashboard),
with content seeded from the README, Makefile, chart values, and CI
workflows: quickstart, installation, local development, troubleshooting,
configuration, architecture, and CI/CD and releasing.

SITE and BASE come from env, matching nebari-llm-serving-pack's pattern, so
the same build works locally (BASE=/) and in production
(SITE=https://packs.nebari.dev BASE=/nebari-frames/). A small remark plugin
prefixes root-absolute content links with BASE so they still resolve once
deployed under a subpath. The header's GitHub link is overridden to point at
this repo instead of the shared theme's default org-level link.

Also adds .github/workflows/docs.yml to build and deploy the site to
Cloudflare Pages on push to main and on pull requests, modeled on
nebari-llm-serving-pack's docs workflow (without the Playwright/mermaid and
link-check steps this project has no use for).
Adds tools/docs-gen, which walks the frames CLI's cobra command tree
(cli/cmd.NewRootCmd) with spf13/cobra/doc and writes one Starlight-ready
Markdown page per command into docs/site/src/content/docs/reference/cli.
Output is deterministic (auto-gen-tag disabled) and committed, so the docs
site builds without needing Go.

go.mod/go.sum pick up spf13/cobra/doc's own dependency (go-md2man), which
was not previously pulled in since nothing imported the doc subpackage.

Run `go run ./tools/docs-gen` from the repository root to regenerate after
CLI changes.
@dcmcand dcmcand merged commit 0f2b888 into main Jul 3, 2026
6 checks passed
@dcmcand dcmcand deleted the feat/docs-site branch July 3, 2026 14:31
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.

[ENH] - docs site (Astro + nebari starlight) publishing automatically to packs.nebari.dev

1 participant