Skip to content

feat(ci): add website + docs CI workflows for merged docs source - #42

Merged
thiras merged 2 commits into
mainfrom
feat/docs-ci
May 8, 2026
Merged

thiras merged 2 commits into
mainfrom
feat/docs-ci

Conversation

@thiras

@thiras thiras commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add .github/workflows/website.yml (lint / format:check / build, paths-ignore: docs/**) and .github/workflows/docs.yml (Prettier + markdownlint-cli2 + mintlify broken-links). Both pin pnpm@10 / node@24 and drop GITHUB_TOKEN to contents: read.
  • Add .markdownlint-cli2.jsonc (MDX-friendly: MD013/033/034/041 disabled) and markdownlint-cli2 as a devDep. Exclude docs/** from ESLint; include .mdx in the lint-staged glob.
  • Document the new boundary in AGENTS.md — docs/ is a Mintlify-built product served from docs.decdn.org, independent of pnpm build.
  • Reformat 10 merged MDX files with Prettier; add text language to one fenced block (MD040 fix in docs/protocol/content-addressing.mdx).
  • Gitignore .claude/settings.local.json — untracked local state was breaking pnpm format:check.

Flagged (not in this PR)

  • lib/links.ts runNode points at https://docs.decdn.org/node-operators/overview, but the merged docs/ has no node-operators/ section yet — once Mintlify rebuilds it will 404 until that section is authored. Out of scope here.

Test plan

  • pnpm lint
  • pnpm format:check
  • pnpm build
  • pnpm exec markdownlint-cli2 — 14 files, 0 errors
  • (cd docs && npx -y mintlify@4.2.555 broken-links) — "no broken links found"
  • Verify the website workflow runs (and only it) when this PR's non-docs files change
  • Verify the docs workflow runs (and only it) on a follow-up MDX-only change

🤖 Generated with Claude Code

The Mintlify docs source merged in 6d1004a had no CI coverage and the
website itself had no CI gates. This adds two scoped workflows
(website: lint/format:check/build; docs: prettier/markdownlint/mintlify
broken-links) plus the tooling to support them, and documents the new
boundary in AGENTS.md.

- .github/workflows/website.yml — paths-ignore docs/**; pnpm@10/node@24;
  permissions: contents: read.
- .github/workflows/docs.yml — paths docs/** + tool-config + lockfile so
  devDep bumps re-run; pinned mintlify@4.2.555.
- .markdownlint-cli2.jsonc — MDX-friendly (MD013/033/034/041 disabled);
  markdownlint-cli2 added as devDep.
- ESLint globalIgnores docs/**; lint-staged glob now covers .mdx.
- AGENTS.md — Layout entry + Gotcha explaining the docs surface is a
  separate Mintlify build, not part of pnpm build.
- Drive-bys: gitignore .claude/settings.local.json (untracked local
  drift was breaking format:check); reformat the 10 merged MDX files
  with Prettier; add 'text' language to one fenced block (MD040).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 8, 2026 19:23
@mintlify

mintlify Bot commented May 8, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
decdn 🟢 Ready View Preview May 8, 2026, 7:23 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 8, 2026 •

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: fac56d6
Status: ✅  Deploy successful!
Preview URL: https://29e0f1de.website-70y.pages.dev
Branch Preview URL: https://feat-docs-ci.website-70y.pages.dev

View logs

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces documentation linting using markdownlint-cli2 and updates the project's documentation structure. Key changes include the addition of a .markdownlint-cli2.jsonc configuration file, updates to .gitignore and .prettierignore to exclude local Claude settings, and new documentation in AGENTS.md regarding the docs/ directory's independent build pipeline. Several MDX files were also reformatted for consistency. Feedback suggests integrating the new markdown linter into the lint-staged configuration in package.json to ensure documentation is automatically linted and fixed before being committed.

Comment thread package.json

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds CI separation between the Next.js marketing website and the Mintlify docs/ source, introducing dedicated workflows and docs-specific linting while updating repo tooling/config to reflect the new boundary.

Changes:

  • Add separate GitHub Actions workflows for website (lint/format/build) and docs (Prettier, markdownlint-cli2, Mintlify broken-links).
  • Introduce markdownlint-cli2 with an MDX-friendly config, and update tooling to treat docs/ as a separate product (ESLint ignore + AGENTS guidance).
  • Apply Prettier reformatting to merged MDX docs and tighten formatting behavior (e.g., fenced code block language).

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pnpm-lock.yaml Locks markdownlint-cli2 and its dependency graph for consistent CI installs.
package.json Adds markdownlint-cli2 devDep and includes mdx in lint-staged Prettier globs.
eslint.config.mjs Ignores docs/** so website linting doesn’t traverse Mintlify sources.
docs/protocol/takedown.mdx Prettier reformat of tables for consistent MDX rendering.
docs/protocol/slashing.mdx Prettier reformat of tables for consistent MDX rendering.
docs/protocol/reputation.mdx Prettier reformat of tables for consistent MDX rendering.
docs/protocol/privacy.mdx Prettier reformat of tables for consistent MDX rendering.
docs/protocol/governance.mdx Prettier reformat of tables for consistent MDX rendering.
docs/protocol/content-addressing.mdx Adds fenced block language (text) and reformats a table.
docs/overview/participants.mdx Prettier reformat of tables for consistent MDX rendering.
docs/overview/how-it-works.mdx Prettier reformat of tables for consistent MDX rendering.
docs/overview/glossary.mdx Prettier reformat of glossary table for consistent MDX rendering.
docs/overview/architecture.mdx Prettier reformat of participant roles table for consistent MDX rendering.
AGENTS.md Documents that docs/ is built/served independently from the website export.
.prettierignore Ignores local Claude state file to prevent format:check failures.
.markdownlint-cli2.jsonc Adds MDX-friendly markdownlint-cli2 configuration scoped to docs/**.
.gitignore Ignores local Claude state file from version control.
.github/workflows/website.yml Adds website CI workflow (lint, format:check, build) with path filtering.
.github/workflows/docs.yml Adds docs CI workflow (Prettier, markdownlint-cli2, Mintlify broken-links) with path filtering.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/website.yml Outdated
Comment thread .github/workflows/docs.yml
- website.yml: drop `**/*.md` from paths-ignore so root-MD-only PRs
  (AGENTS.md, README.md, CLAUDE.md) still run `pnpm format:check`.
- docs.yml: add `.prettierrc.json` and `.prettierignore` to both
  triggers so changes to Prettier config re-run the docs check.
- package.json: add `markdownlint-cli2 --fix` to the lint-staged glob
  for `docs/**/*.{md,mdx}`, matching the CI scope so commit-time
  enforcement mirrors what CI catches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thiras
thiras merged commit d39968b into main May 8, 2026
7 checks passed
@thiras
thiras deleted the feat/docs-ci branch May 8, 2026 19:48
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