Add Mintlify docs verification workflow#778
Conversation
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>
|
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.
|
Co-authored-by: Joe Spadola <joe.spadola@clickhouse.com> Signed-off-by: Shaun Struwig <41984034+Blargian@users.noreply.github.com>
|
Hi @joe-clickhouse, we're now deploying the new site from 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. |
There was a problem hiding this comment.
@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 Any chance I could ask for a review on ClickHouse/ClickHouse#109585? 🙏 |
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>
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>
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:
Checklist
Delete items not relevant to your PR: