Skip to content

feat(docs-site): add reusable docs workflows and mkDocsShell - #162

Merged
hakula139 merged 1 commit into
mainfrom
feat/reusable-docs-site
Dec 6, 2026
Merged

hakula139 merged 1 commit into
mainfrom
feat/reusable-docs-site

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

Add reusable docs-site infrastructure for documentation sites built with Node and pnpm and deployed to Cloudflare Workers.

  • Add dk.mkDocsShell in nix/lib.nix providing nodeToolchain, lychee, and playwright-driver.browsers, exporting PLAYWRIGHT_BROWSERS_PATH in both env and shellHook so inputsFrom shell compositions preserve the browser path.
  • Add an optional dev-shell input to .github/actions/workers/action.yml and scripts/workers.nu so Workers commands can run inside a non-default flake dev shell attribute.
  • Add .github/workflows/docs.yml to run frozen pnpm installs, format:check, check, lint, build, optional offline lychee link checks, optional test:e2e, pull request preview deploys with sticky <!-- docs-preview --> comments, and default-branch production deploys.
  • Add .github/workflows/docs-cleanup.yml on pull_request_target: closed sharing the preview-<number> concurrency group to delete pull request previews from the trusted base checkout.
  • Add Renovate package rules in default.json grouping Astro (astro, @astrojs/*) and Starlight (starlight-*) minor and major updates with automerge disabled while keeping patch updates in Node dependencies.
  • Document setup, workflow inputs, secrets, and Renovate behavior in docs/docs-site.md, and link it from AGENTS.md, README.md, and docs/ci.md.

Test plan

  • nix flake check passed locally on aarch64-darwin
  • nix flake check --all-systems passed locally (evaluated x86_64-linux, aarch64-linux, and aarch64-darwin outputs and built local checks with all new files staged)
  • Pre-commit and pre-push hooks passed (all 17 applicable pre-commit hooks passed on commit, pre-push hooks passed, and nix develop -c run-hooks passed prior to commit)
  • Hosted GitHub Actions execution of docs.yml and docs-cleanup.yml and live Cloudflare Workers preview, production, and cleanup runs remain unverified until exercised by a consumer repository

Add reusable docs-site infrastructure for documentation sites built with Node and pnpm and deployed to Cloudflare Workers.

- Add `dk.mkDocsShell` in `nix/lib.nix` providing `nodeToolchain`, `lychee`, and `playwright-driver.browsers` with `PLAYWRIGHT_BROWSERS_PATH` exported in both `env` and `shellHook`.
- Add `dev-shell` input support to the `workers` action and `scripts/workers.nu` so preview and production deploys can enter a non-default flake dev shell.
- Add `.github/workflows/docs.yml` for formatting, typecheck, lint, build, optional lychee link checks, optional E2E tests, PR preview deploys with sticky comments, and default-branch production deploys.
- Add `.github/workflows/docs-cleanup.yml` to remove PR preview deployments on `pull_request_target: closed`.
- Group Astro and Starlight minor and major npm updates in `default.json` with automerge disabled.
- Document the contract in `docs/docs-site.md` and link it from `AGENTS.md`, `README.md`, and `docs/ci.md`.
@hakula139 hakula139 added the enhancement New capability label Dec 6, 2026
@hakula139 hakula139 self-assigned this Dec 6, 2026
@hakula139
hakula139 merged commit 62ee394 into main Dec 6, 2026
3 checks passed
@hakula139
hakula139 deleted the feat/reusable-docs-site branch December 6, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant