Skip to content

fix(docs): unbreak the docs build and gate it in CI - #668

Merged
rhuanbarreto merged 1 commit into
mainfrom
fix/docs-empty-code-block
Nov 12, 2026
Merged

rhuanbarreto merged 1 commit into
mainfrom
fix/docs-empty-code-block

Conversation

@rhuanbarreto

@rhuanbarreto rhuanbarreto commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Fix

The Cloudflare Pages build for cli.archgate.dev has failed on every commit since #660 (docs lockfile refresh). The refreshed Markdown parser emits an empty fenced block as a <code> element with no text child, and rehype-expressive-code crashes on it:

Cannot read properties of undefined (reading 'type')
  at getCodeBlockInfo (rehype-expressive-code/dist/index.js:19)
  Location: docs/src/content/docs/reference/cli/credential.mdx

The only empty fences in the docs are the signed-out example in credential.mdx (en, pt-br, nb). The sentence above it already says the command prints nothing, so the block is removed.

Guard

#660 merged with the Cloudflare Pages check red because that check is not required. The Validate workflow gains:

  • Detect Docs Changes: true when the change touches docs/ or code-pull-request.yml (always true on manual or workflow_call runs).
  • Docs Build: runs exactly what Cloudflare runs: bun install --frozen-lockfile and bun run build in docs/, on the Node major from .prototools.
  • Validate Code: the required gate fails unless Docs Build passed. It passes only if the job was skipped because no docs changed.

GEN-001 is amended to require this gate. It still keeps the docs out of bun run validate, so CLI-only changes and the offline pre-push hook are unaffected.

Verified locally: astro build (Node 24, current lockfile) builds 172 pages; archgate check and format:check pass.

The credential reference showed the signed-out output as an empty fenced
block. The current Markdown parser emits it as a code element with no text
child, and rehype-expressive-code crashes on it, failing every Cloudflare
Pages build since the docs lockfile refresh. The sentence above the block
already says the command prints nothing.

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Deploying archgate-cli with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8078fad
Status: ✅  Deploy successful!
Preview URL: https://c7665fef.archgate-cli.pages.dev
Branch Preview URL: https://fix-docs-empty-code-block.archgate-cli.pages.dev

View logs

@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The credential reference documentation removes empty Markdown code fences after the signed-out example. The change appears in the English, Norwegian Bokmål, and Brazilian Portuguese pages, and in the generated full-text reference. No CLI behavior or public declarations changed.

Merge Risk: Minimal · up to 8078f

This documentation-only change removes an empty code block that was breaking the docs build. It does not affect CLI behavior and has no identified merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: removing an empty code block from the docs that breaks the docs build. The raw summary shows the four-line removal in the credential CLI reference pages, which matches…
Description check Passed The description states the failing Cloudflare Pages build, the empty fenced block in credential.mdx (en, pt-br, nb), the crash in rehype-expressive-code, and the verification steps. These match the fi…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: removing an empty code block from the docs that breaks the docs build. The raw summary shows the four-line removal in the credential CLI reference pages, which matches the title. The title is short, specific, and uses the conventional fix(docs) prefix.

Full details: Description check

Explanation

The description states the failing Cloudflare Pages build, the empty fenced block in credential.mdx (en, pt-br, nb), the crash in rehype-expressive-code, and the verification steps. These match the file-level summaries, which show removed fence lines in the credential docs. The description is specific and on topic.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 57bb8fc6-9820-45ac-b815-7ebb0a05c2fe
Commits

Reviewing files that changed from the base of the PR and between 70df115 and 8078fad.

Files selected for processing: 4

  • docs/public/llms-full.txt
  • docs/src/content/docs/nb/reference/cli/credential.mdx
  • docs/src/content/docs/pt-br/reference/cli/credential.mdx
  • docs/src/content/docs/reference/cli/credential.mdx
Files with no reviewable changes: 4

  • docs/public/llms-full.txt
  • docs/src/content/docs/nb/reference/cli/credential.mdx
  • docs/src/content/docs/reference/cli/credential.mdx
  • docs/src/content/docs/pt-br/reference/cli/credential.mdx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 16

  • GitHub Check: archgate
  • GitHub Check: CodeRabbit
  • GitHub Check: Smoke Test (Linux) / Linux
  • GitHub Check: Smoke Test (Windows) / Windows
  • GitHub Check: Archgate SARIF (Code Scanning)
  • GitHub Check: Lint, Test & Check
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (actions)
  • GitHub Check: Update llms-full.txt
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: Analyze (ruby)
  • GitHub Check: Analyze (java-kotlin)
  • GitHub Check: Analyze (csharp)
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (python)
  • GitHub Check: Cloudflare Pages

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Code Coverage

Metric Value
Lines 99.9% (11323 / 11333)
Threshold 99.9% minimum — met
Platforms Linux + Windows

Full HTML report available in workflow artifacts.

Per-directory breakdown
Directory Coverage Lines
src/commands/ 100.0% 2340 / 2340
src/engine/ 100.0% 2622 / 2623
src/formats/ 100.0% 151 / 151
src/helpers/ 99.9% 6210 / 6219

@rhuanbarreto
rhuanbarreto merged commit ee9fcac into main Nov 12, 2026
25 checks passed
@rhuanbarreto
rhuanbarreto deleted the fix/docs-empty-code-block branch November 12, 2026 13:34
@archgatebot archgatebot Bot mentioned this pull request Nov 12, 2026
@rhuanbarreto rhuanbarreto changed the title fix(docs): drop empty code block that breaks the docs build fix(docs): unbreak the docs build and gate it in CI Nov 12, 2026
rhuanbarreto added a commit that referenced this pull request Nov 12, 2026
#660 merged with the Cloudflare Pages check red, because that check is
not required. cli.archgate.dev then stayed broken until #668. This PR
closes that gap.

- **Detect Docs Changes**: true when the change touches `docs/` or
`code-pull-request.yml` (always true on manual or `workflow_call` runs).
- **Docs Build**: runs exactly what Cloudflare runs: `bun install
--frozen-lockfile` and `bun run build` in `docs/`, on the Node major
from `.prototools`.
- **Validate Code**: the required gate fails unless Docs Build passed.
It passes only if the job was skipped because no docs changed.

GEN-001 is amended to require this gate. It still keeps the docs out of
`bun run validate`, so CLI-only changes and the offline pre-push hook
are unaffected.

This PR edits the workflow, so its own run includes Docs Build.

---------

Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
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.

1 participant