DocsCI for docusaurus docs CI

CI for Docusaurus Documentation

Stop shipping broken code examples in your Docusaurus site. DocsCI runs on every PR — executing snippets, detecting API drift, and posting inline PR comments with fixes.

5 min

Setup time

6+

Languages supported

40+

Secret scan patterns

100%

Hermetically isolated

Docusaurus is great. Your docs CI isn't.

Docusaurus makes it easy to write beautiful documentation. But it doesn't verify that the code inside actually works — and neither does your default CI setup.

  • Code snippets in MDX files become stale as your API evolves — no automated check catches it
  • Accessibility issues in custom React components go unnoticed until users report them
  • When your OpenAPI spec changes, documented request/response examples silently diverge
  • Broken examples in docs cause support tickets and damage developer trust
  • Writing a custom test script for Docusaurus MDX fenced code blocks takes days and breaks often

DocsCI: the missing CI layer for Docusaurus

DocsCI reads your Docusaurus repository, extracts every fenced code block from MDX and Markdown files, and executes them in sandboxed runtimes. It detects API drift between your OpenAPI spec and documented examples, checks accessibility in rendered components, and posts precise PR comments with AI-generated fixes. Add one GitHub Action — no changes to your Docusaurus config.

Everything you need

MDX-native snippet extraction

DocsCI parses Docusaurus MDX files and extracts fenced code blocks in JS, TS, Python, Go, Bash, and cURL — ignoring non-executable content blocks.

🔍

OpenAPI drift detection

Import your OpenAPI spec via docsci.yml. DocsCI diffs every documented endpoint, parameter, and response schema against the spec on each PR.

Accessibility checks

axe-core checks run against your doc pages. WCAG violations — missing alt text, low contrast, invalid ARIA — are flagged as findings with line numbers.

🤖

AI-generated fixes

For every broken snippet or drift finding, Claude generates a patch diff and PR comment explaining the fix — so your team spends less time debugging.

🔒

Hermetic sandboxes

Each snippet runs in an isolated V8 or WASM sandbox. No shared state, no host contamination, no credential leaks. Secret scanning runs before execution.

📊

Run metrics dashboard

Track pass rates, finding trends, and snippet health over time. Export as JSON or SARIF for GitHub Code Scanning integration.

How it works

1

Add the GitHub Action

Copy the DocsCI action into .github/workflows/ — it runs on every push to main and every pull request.

# .github/workflows/docsci.yml
- name: Run DocsCI
  run: |
    curl -sf -X POST https://snippetci.com/api/runs/queue \
      -H "Authorization: Bearer ${{ secrets.DOCSCI_TOKEN }}" \
      -F "docs_archive=@docs.tar.gz"
2

Configure your docsci.yml (optional)

Point at your OpenAPI spec, set language allowlist, configure network policy.

# docsci.yml (optional)
docs:
  path: ./docs
  include: ["**/*.md", "**/*.mdx"]
openapi:
  url: https://api.example.com/openapi.json
checks:
  snippets: true
  accessibility: true
  drift: true
3

Review PR comments

DocsCI posts inline comments with exact file/line, error message, and an AI-generated fix — directly in your Docusaurus pull requests.

Frequently asked questions

Does DocsCI work with Docusaurus MDX files?

Yes. DocsCI parses both .md and .mdx files, extracting fenced code blocks. It handles standard MDX including imports and JSX — non-executable blocks are skipped.

Do I need to modify my Docusaurus configuration?

No. DocsCI reads your repository directly via GitHub. No changes to docusaurus.config.js or any other Docusaurus files are needed.

Can DocsCI test interactive code blocks (live editor)?

DocsCI executes standard fenced code blocks. Docusaurus live editor blocks (using react-live) are detected and executed in the appropriate sandbox.

How does DocsCI handle Docusaurus versioned docs?

DocsCI processes all files matching the include glob in docsci.yml. Configure include to target specific versions: ['versioned_docs/version-2.0/**/*.md'].

Ready to stop shipping broken docs?

Join API and platform teams who use DocsCI to ship verified documentation.