Skip to content

Add per-PR markdownlint CI check and Automated tests reference - #207

Open
digitaldiina wants to merge 4 commits into
mainfrom
137-ci-workflows
Open

Add per-PR markdownlint CI check and Automated tests reference#207
digitaldiina wants to merge 4 commits into
mainfrom
137-ci-workflows

Conversation

@digitaldiina

Copy link
Copy Markdown
Contributor

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: Mintlify's dashboard "Add-ons > CI Checks" page runs Vale natively against this repo's existing .vale.ini on 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.
  • Markdownlint: not covered by Mintlify natively. This is the one check that needed real work.

What shipped

  • .github/workflows/markdownlint.yml - adapted from the old superoffice-docs repo's ci.yml (real prior art, not built from scratch): same push-to-main + pull_request triggers, but switched from markdownlint-cli v1 to markdownlint-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/.mdx files 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.
  • New 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 incompatible markdownlint-cli v1 instead of markdownlint-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-cli2 run locally before/after on all touched/new files: contribute/review/index.mdx shows 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.
  • This PR is draft and deliberately includes 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.

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.
@mintlify

mintlify Bot commented Aug 10, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
superofficeas 🟢 Ready View Preview Aug 10, 2026, 11:30 AM

💡 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.
Bergfrid Dias added 2 commits August 10, 2026 13:40
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.
@digitaldiina

Copy link
Copy Markdown
Contributor Author

Correction round - per direct feedback, excluded generated/template content from the markdownlint workflow: reference/ folders (any depth), database/tables/, release-notes/api/, release-notes/database/, blueprint-templates/, and api-sources/.

Empirically found that markdownlint-cli2's own .markdownlintignore does not filter an explicit file-path list (only broad, unqualified glob expansion) - confirmed by testing the pre-existing /downloads/ entry against a direct path to a file inside it, which still got linted. So the real exclusion is implemented via tj-actions/changed-files' own files_ignore input, filtering before markdownlint-cli2 ever sees the paths. .markdownlintignore is still updated to match, for local/full-tree linting scenarios where that mechanism does apply.

Verified via two temporary test files (one in blueprint-templates/, one in en/api/reference/, both with a deliberate MD018 violation) - the Action's changed-files list correctly excluded both, only the 4 genuinely-changed docs files were linted. Removed once confirmed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mintlify/ci Build/deploy pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build .github/workflows/ CI pipeline (Vale, markdownlint, mint validate/broken-links)

1 participant