chore(docs): build the docs with pnpm and lint markdown with rumdl - #95
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 installedmarkdownlint-cliglobally on every run. Both diverge frominfrahub-mcpandinfrahub-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
docs/pnpm-lock.yamlreplacesdocs/package-lock.json,docs/package.jsonpins pnpm 11.6.0, andbuild-docs.sh, the invoke tasks and CI all install withpnpm install --frozen-lockfile.invoke docs.installandinvoke docs.buildstill work as before.[tool.rumdl]inpyproject.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 generateddocs/docs/home.mdxand is fixed in the template it comes from.docs/reference/, but the generated pages live indocs/docs/reference/. The path matched nothing, so the check exited zero unconditionally — stale generated docs have never been caught..github/wholesale. It now lints them, withtruthy: check-keys: falseso bareon:keys need no inline disable, and the two findings this surfaced insync-docs.ymlare fixed.permissions: contents: readandpull-requests: readscoped to the job that needs it. Action majors are pinned to the ones the sibling repositories use.Notes for reviewers
docs/pnpm-workspace.yamlis the one non-obvious file. pnpm 10 and later block unapproved dependency build scripts and exit non-zero; without declaring thatcore-jsneeds no build step,pnpm install --frozen-lockfilefails in CI. Both sibling repositories carry the same file for the same reason.docs/pnpm-lock.yamlis YAML wherepackage-lock.jsonwas JSON, so yamllint sees it for the first time and it is added to the ignore list..nvmrcand in CI, which pnpm 11 requires.ci.ymlkeeps a narrowed# yamllint disable rule:line-lengthfor the Valefindinvocation, matchinginfrahub-mcp.Test Plan
Run locally on this branch — all pass:
actionlintreports 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