Skip to content

chore(docs): build the docs with pnpm and lint markdown with rumdl - #95

Merged
BeArchiTek merged 1 commit into
mainfrom
chore/docs-pnpm-rumdl
Sep 15, 2026
Merged

BeArchiTek merged 1 commit into
mainfrom
chore/docs-pnpm-rumdl

Conversation

@BeArchiTek

Copy link
Copy Markdown
Contributor

Summary

The documentation toolchain was the last part of this repository still reaching for npm: the site was built with npm install, and the markdown-lint job installed markdownlint-cli globally on every run. Both diverge from infrahub-mcp and infrahub-sync, which build their docs with pnpm and lint Markdown with rumdl through uv. This brings the toolchain into line with them, and fixes two CI checks that were silently not doing their job.

Key Changes

  • Contributors get the same docs toolchain as the other repositories. The site builds with pnpm: docs/pnpm-lock.yaml replaces docs/package-lock.json, docs/package.json pins pnpm 11.6.0, and build-docs.sh, the invoke tasks and CI all install with pnpm install --frozen-lockfile. invoke docs.install and invoke docs.build still work as before.
  • Markdown linting no longer needs a global npm install in CI. rumdl runs through uv, configured under [tool.rumdl] in pyproject.toml. The rules are a one-for-one translation of the previous .markdownlint.yaml, so no repository content had to change; the single finding was in the generated docs/docs/home.mdx and is fixed in the template it comes from.
  • The documentation freshness check can now actually fail. It compared docs/reference/, but the generated pages live in docs/docs/reference/. The path matched nothing, so the check exited zero unconditionally — stale generated docs have never been caught.
  • Workflow files are linted for the first time. yamllint ignored .github/ wholesale. It now lints them, with truthy: check-keys: false so bare on: keys need no inline disable, and the two findings this surfaced in sync-docs.yml are fixed.
  • CI runs with least privilege, with a top-level permissions: contents: read and pull-requests: read scoped to the job that needs it. Action majors are pinned to the ones the sibling repositories use.

Notes for reviewers

  • docs/pnpm-workspace.yaml is the one non-obvious file. pnpm 10 and later block unapproved dependency build scripts and exit non-zero; without declaring that core-js needs no build step, pnpm install --frozen-lockfile fails in CI. Both sibling repositories carry the same file for the same reason.
  • docs/pnpm-lock.yaml is YAML where package-lock.json was JSON, so yamllint sees it for the first time and it is added to the ignore list.
  • Node moves from 20 to 22 in .nvmrc and in CI, which pnpm 11 requires.
  • ci.yml keeps a narrowed # yamllint disable rule:line-length for the Vale find invocation, matching infrahub-mcp.

Test Plan

Run locally on this branch — all pass:

uv run yamllint -s .
uv run ruff check . && uv run ruff format --check --diff .
uv run mypy --show-error-codes . && uv run pylint --ignore .venv .
uv run pytest
uv run rumdl check .
cd docs && pnpm install --frozen-lockfile
uv run invoke docs.build
uv run invoke docs.generate   # leaves docs/docs/reference/ unchanged

actionlint reports the same seven pre-existing shellcheck notes before and after this change, so no new workflow issues were introduced.


Assisted-by: opsmill-repo-auditing-repo-standards 0.1.0
Assisted-by: opsmill-dev-commit 0.1.0
Assisted-by: opsmill-dev-pr 0.2.0

The documentation toolchain was the last part of this repository still
reaching for npm. The site was built with `npm install`, and the
markdown-lint job installed markdownlint-cli globally with `npm install -g`
on every run. Both diverge from infrahub-mcp and infrahub-sync, which build
their docs with pnpm and lint Markdown with rumdl through uv.

Move the docs build to pnpm: `docs/pnpm-lock.yaml` replaces
`docs/package-lock.json`, `docs/package.json` pins pnpm 11.6.0, and
build-docs.sh, the invoke tasks and CI all install with
`pnpm install --frozen-lockfile`. `docs/pnpm-workspace.yaml` declares that
core-js needs no build step; without it pnpm blocks the unapproved
postinstall script and exits non-zero, failing the install in CI.

Replace markdownlint-cli with rumdl, configured under `[tool.rumdl]` in
pyproject.toml. The rules are a one-for-one translation of the previous
.markdownlint.yaml, so no repository content had to change. The single
finding was in the generated docs/docs/home.mdx and is fixed in the
template it comes from.

Along the way:

- The documentation freshness gate compared `docs/reference/`, but the
  generated pages live in `docs/docs/reference/`. The path matched nothing,
  so the check exited zero unconditionally and could never fail.
- yamllint ignored `.github/` wholesale, so no workflow was ever linted.
  Lint them, with `truthy: check-keys: false` to allow bare `on:` keys,
  and fix the two findings that surfaced in sync-docs.yml.
- `docs/pnpm-lock.yaml` is YAML where package-lock.json was JSON, so it is
  newly visible to yamllint and is excluded.
- Pin the action majors the sibling repositories use, and give the workflow
  a least-privilege permissions block.
- Node moves from 20 to 22, which pnpm 11 requires.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@BeArchiTek
BeArchiTek merged commit 2897eef into main Sep 15, 2026
9 of 10 checks passed
@BeArchiTek
BeArchiTek deleted the chore/docs-pnpm-rumdl branch September 15, 2026 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant