diff --git a/.github/workflows/docs_verify.yml b/.github/workflows/docs_verify.yml new file mode 100644 index 00000000..b0ef0731 --- /dev/null +++ b/.github/workflows/docs_verify.yml @@ -0,0 +1,46 @@ +name: 'Verify Docs' + +on: + pull_request: + branches: + - main + paths: + - 'docs/**' + - '.github/workflows/docs_verify.yml' + push: + branches: + - main + paths: + - 'docs/**' + - '.github/workflows/docs_verify.yml' + +jobs: + verify: + runs-on: ubuntu-latest + name: Mintlify checks + # Run inside the docs image so every dependency (git, python3, mint, node) + # is present -- nothing is installed, and this repo vendors no scripts. + container: + image: clickhouse/docs-builder + steps: + - name: Checkout clickhouse-connect + uses: actions/checkout@v4 + + # Fetch the check driver from ClickHouse/ClickHouse rather than vendoring + # it. The driver shallow/sparse-clones the aggregator docs plus its CI + # scripts (ci/jobs/scripts/docs), so any check scripts come along for free. + - name: Fetch the docs check driver + run: | + curl -fsSL -o /tmp/mintlify_docs_check.py \ + https://raw.githubusercontent.com/ClickHouse/ClickHouse/master/ci/jobs/scripts/docs/mintlify_docs_check.py + + # The driver clones the aggregator, replaces the Python client folder with + # this repo's docs/ (wiping it first, so deletions/renames are seen), and + # runs the checks (mint validate + mint broken-links) from the docs root. + # It exits non-zero if any check fails, so a green step means all passed. + - name: Run Mintlify docs checks + run: | + python3 /tmp/mintlify_docs_check.py \ + --repo https://github.com/ClickHouse/ClickHouse.git \ + --ref master \ + --replace docs:integrations/language-clients/python