Files
datastore/ci/workflows/nightly_cloud_api_docs.py
Shaun StruwigandClaude Fable 5 3dfaccbe60 Cloud API reference: per-endpoint maturity badges in the sidebar
Mintlify only allows a badge on navigation groups, not on individual
OpenAPI operation entries, so the API explorer could not show which
endpoints are in beta or deprecated the way the hosted swagger page
does. Generate one MDX page per operation (frontmatter carries the
operation reference plus a `tag`/`deprecated` flag), write the
navigation subtree as a single fragment referenced via `$ref` from
`docs.json` and `products/cloud/navigation.json`, and add a nightly CI
job to regenerate the pages from the live spec.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-09 13:43:02 +02:00

32 lines
990 B
Python

from praktika import Job, Workflow
from ci.defs.defs import BASE_BRANCH, SECRETS, RunnerLabels
# Nightly sync of the ClickHouse Cloud API reference docs from the live OpenAPI
# spec (https://api.clickhouse.cloud/v1). The job regenerates the per-endpoint
# pages + docs.json navigation so each endpoint carries its own maturity badge
# (Beta / Private preview / Deprecated), and opens or refreshes a single bot PR
# when the docs drift from the spec. See ci/jobs/cloud_api_docs_nightly.py.
workflow = Workflow.Config(
name="NightlyCloudAPIDocs",
event=Workflow.Event.SCHEDULE,
branches=[BASE_BRANCH],
jobs=[
Job.Config(
name="Sync Cloud API docs",
command="python3 ./ci/jobs/cloud_api_docs_nightly.py",
runs_on=RunnerLabels.STYLE_CHECK_ARM,
enable_gh_auth=True,
),
],
secrets=SECRETS,
enable_report=True,
enable_cidb=False,
cron_schedules=["13 7 * * *"],
)
WORKFLOWS = [
workflow,
]