Skip to content

Add Mintlify docs verification workflow#778

Open
Blargian wants to merge 10 commits into
ClickHouse:mainfrom
Blargian:docs-verify-mintlify
Open

Add Mintlify docs verification workflow#778
Blargian wants to merge 10 commits into
ClickHouse:mainfrom
Blargian:docs-verify-mintlify

Conversation

@Blargian

@Blargian Blargian commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Verify this repo's docs/ as a slice of the aggregated ClickHouse docs site over on ClickHouse/ClickHouse. The job runs inside the clickhouse/docs-builder image, where git, python3 and mint (mintlify CLI) are all present, so nothing is installed and this repo vendors no scripts.

It fetches the check driver from ClickHouse/ClickHouse at runtime; the driver shallow/sparse-clones the aggregator docs and any scripts needed to run the docs check, replaces the language client docs copy in the aggregator repo with this repo's docs/ (from the branch the docs check runs on) and runs the same checks that ClickHouse/ClickHouse docs check runs from the docs root. A non-zero exit fails the job.

Requires:

  1. CI (docs): Reusable Mintlify docs checks for integrations repos ClickHouse#106258 (refactors the Mintlify docs check as part of praktika to be easily consumable from other repos without needing praktika as a dependency)
  2. PR to add the Mintlify site in https://github.com/ClickHouse/mintlify-docs-dev to the server repo.

Checklist

Delete items not relevant to your PR:

  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Verify this repo's docs/ as a slice of the aggregated ClickHouse docs site.
The job runs inside the clickhouse/docs-builder image, where git, python3 and
mint are all present, so nothing is installed and this repo vendors no scripts.

It fetches the check driver from ClickHouse/ClickHouse at runtime; the driver
shallow/sparse-clones the aggregator docs (bringing ci/jobs/scripts/docs along
for free), replaces the Python client folder with this repo's docs/ -- wiping
it first so deletions and renames are reflected -- and runs the checks
(mint validate + mint broken-links) from the docs root. A non-zero exit fails
the job, so a green run means every check passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changes to the workflow itself should also run the check, so add the
workflow file to the paths filter of both triggers.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread .github/workflows/docs_verify.yml Outdated
@joe-clickhouse

joe-clickhouse commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

According to Claude:

Status update after ClickHouse/ClickHouse#106258 merged today. I re-ran the failed Mintlify check and the workflow itself now works end to end. The driver downloads, splices this repo's docs into the aggregator, and runs both checks.

The remaining failures are not problems with this workflow.

  1. The aggregator docs on ClickHouse master are still a skeleton. The missing snippet and most of the broken links are pages that exist in mintlify-docs-dev but have not been imported to the server repo yet. The check cannot pass until that lands.
  2. Our docs still used the old /core link prefix, which does not exist in the new site layout. Fix is up in fix docs links for the new Mintlify site layout #794. Once that merges, a re-run here will pick it up through the merge ref.

Blargian and others added 3 commits July 2, 2026 14:45
Co-authored-by: Joe Spadola <joe.spadola@clickhouse.com>
Signed-off-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
@Blargian

Blargian commented Jul 5, 2026

Copy link
Copy Markdown
Member Author

Hi @joe-clickhouse, we're now deploying the new site from /docs in ClickHouse/ClickHouse. After #794 the check here should pass.

Quite slow to run - 16 minutes (we have about 16 000 pages in the docs with translation), but I can take this to Mintlify to speed up.

@Blargian Blargian marked this pull request as ready for review July 6, 2026 11:17
@Blargian Blargian requested a review from peter-leonov-ch as a code owner July 6, 2026 11:17
@Blargian Blargian changed the title [WIP] add Mintlify docs verification workflow Add Mintlify docs verification workflow Jul 6, 2026

@joe-clickhouse joe-clickhouse left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Blargian looks like it worked! 14 min (which is what it took in this run) for the docs workflow is a bit of a deal breaker though. So the sooner we can bring that up with mintlify the better.

@Blargian

Blargian commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

@Blargian looks like it worked! 14 min (which is what it took in this run) for the docs workflow is a bit of a deal breaker though. So the sooner we can bring that up with mintlify the better.

Opened ClickHouse/ClickHouse#109585 to address. Had Claude take a look at what mint validate does internally, and just build a bare minimum version of that which will run only for the pages in this repo, rather than on all 16 000 pages of docs (with translations). Should be good enough for our purposes - we just need to check that these pages have valid MDX and that the nav points to files which exist. We will run the full check only when PRing the changes against ClickHouse/ClickHouse in any case.

Any chance I could ask for a review on ClickHouse/ClickHouse#109585? 🙏

govtech42 pushed a commit to mirror81/ClickHouse that referenced this pull request Jul 7, 2026
The client docs check driver ran the full `mint validate`, which MDX-parses
every page of the aggregated site single-threaded and takes ~13 minutes of the
~16-minute job, while a client PR can only change the files inside its own
slice. Add `scoped_validate.mjs`, which uses Mintlify's own packages (from
the `mint` install in the docs image) to validate docs.json with `$ref`
includes resolved, check that in-scope navigation entries resolve to files,
run Mintlify's per-page processing (`createPage`: frontmatter + MDX parse)
over just the replaced folders, and check that `/snippets/...` imports
resolve. Wire it into `mintlify_docs_check.py` behind a new `--scoped`
flag that narrows validation to the `--replace` destinations; the
aggregator's own CI still runs the full validate. Scoped runs take seconds
(~2.5 s for the Python client slice, ~3.3 s for all of integrations).

Related: ClickHouse/clickhouse-connect#778

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Blargian and others added 3 commits July 7, 2026 15:37
Adds --scoped to the docs check invocation, swapping the full site-wide
mint validate (~13 min, single-threaded MDX parse of every page) for a
scoped validate of just this repo's docs slice (~seconds). Link and
anchor integrity remain covered site-wide by the lychee check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
test should fail

Signed-off-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
Signed-off-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants