Add per-PR markdownlint CI check and Automated tests reference - #207
Add per-PR markdownlint CI check and Automated tests reference#207digitaldiina wants to merge 4 commits into
Conversation
Adapts the old superoffice-docs repo's ci.yml, switched to markdownlint-cli2 and scoped to changed files only. Vale and build validation are covered by Mintlify's own CI Checks add-on and preview deployment, so no custom Action is added for those - see the new contribute/automated-tests.mdx for the full breakdown. Includes a temporary zz-ci-test-delete-me.mdx to confirm the Action triggers on this PR; will be removed before requesting review.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Confirmed on PR #207 that the Action triggers, scopes to changed files, catches lint issues, and reports without blocking the check - removing the deliberate test file now that verification is done. Also bumps setup-node from 20 (deprecated) to 22.
Per direct feedback: reference/ folders, database/tables/, release-notes/api/, release-notes/database/, blueprint-templates/, and api-sources/ should not be linted by the new Action. Empirically found that markdownlint-cli2's own .markdownlintignore does not filter an explicit list of file paths (only broad, unqualified glob expansion) - confirmed by testing existing entries like /downloads/ against a direct path. So the actual exclusion is implemented via tj-actions/changed-files' files_ignore input, which filters before markdownlint-cli2 ever sees the paths. .markdownlintignore is still updated to match, for local/full-tree linting. Two temporary test files confirm both a literal-path exclusion (blueprint-templates/) and the general reference/** wildcard; will remove once confirmed on this PR.
Confirmed on PR #207 that files_ignore correctly excludes both a literal path (blueprint-templates/) and the reference/** wildcard - the Action's changed-files list only included the 4 genuinely changed docs files, none of the excluded ones.
|
Correction round - per direct feedback, excluded generated/template content from the markdownlint workflow: Empirically found that Verified via two temporary test files (one in |
Closes #137.
Scope, reduced from the issue's original framing
Researched what Mintlify itself already covers before building custom tooling (per this issue's own ask, and a direct instruction this session):
.vale.inion every PR. No repo file needed - just a dashboard toggle (Warning level, matching Adapt lint tooling for Mintlify: Markdownlint + Vale #82's advisory-first decision). Will confirm this toggle is set once this PR is otherwise ready.mint validate: confirmed via Mintlify's own CLI docs that this is a build/schema validator, unrelated to Vale, and doesn't check broken links or accessibility (those are separate commands). Not added as a separate Action here because the PR preview deployment (live since Configure Mintlify auto-deploy on merge to main #79/Enable PR preview deployments #80) already performs equivalent build validation on every PR - a duplicate check.What shipped
.github/workflows/markdownlint.yml- adapted from the oldsuperoffice-docsrepo'sci.yml(real prior art, not built from scratch): same push-to-main + pull_request triggers, but switched frommarkdownlint-cliv1 tomarkdownlint-cli2(the tool already used locally here, and the only one supporting the newer rules in.markdownlint.yaml), and scoped to only the changed.md/.mdxfiles per PR/push instead of a whole-tree lint. Advisory only (continue-on-error), matching Adapt lint tooling for Mintlify: Markdownlint + Vale #82's decision.contribute/automated-tests.mdx- single reference page for every check that runs against this repo (per-PR and scheduled), added to the Contribute nav. Also documents the Automated broken-link checking (scheduled, repo-wide) #81 broken-link automation (to be created in a follow-up PR).contribute/markdown-guide/markdownlint.mdx- notes the new CI Action, and fixes stale local-install instructions that referenced the incompatiblemarkdownlint-cliv1 instead ofmarkdownlint-cli2.contribute/review/index.mdx- "What to check" now explains what "automatic tests" concretely are and links to the new page.contribute/deployment.mdx- added an explicit{#deploy-trigger-mechanics}anchor since it's now cross-linked from the new page.Verification
markdownlint-cli2run locally before/after on all touched/new files:contribute/review/index.mdxshows the same pre-existing MD053 false positive documented since Verify and style callouts, especially Caution #96/Document PR preview deployments and manual-preview workflow #205 (unused-looking reference inside a<Note>), no new issues.tools/verify-nav-paths.py config/nav-contribute.json: same pre-existing 2 false positives (Overview/map), no new ones.contribute/zz-ci-test-delete-me.mdx(an MD018 violation) to confirm the new Action actually triggers, scopes to changed files, and reports without blocking the check. Will remove that file and mark ready for review once confirmed.