Skip to content

fix(ci): repair docs workflow broken since Feb 25 (YAML block scalar parse error)#344

Merged
bensonwong merged 3 commits intomainfrom
fix/docs-workflow-yaml-parse-error
Mar 16, 2026
Merged

fix(ci): repair docs workflow broken since Feb 25 (YAML block scalar parse error)#344
bensonwong merged 3 commits intomainfrom
fix/docs-workflow-yaml-parse-error

Conversation

@bensonwong
Copy link
Collaborator

Summary

  • The docs deploy workflow (docs.yml) has been failing with "workflow file issue" on every run since 2026-02-25 — 200+ consecutive failures, zero deployments to GitHub Pages.
  • Root cause: the script: | block in the preview-comment job uses YAML literal block scalar syntax. Its indentation level is set at 12 spaces by the first JS line. Two multi-line template literals (linkCheckSection and body) contained content at column 0 (e.g. <details>, plain prose, ---), which fell below the 12-space threshold and caused YAML to terminate the block scalar early. GitHub's parser then tried to interpret raw HTML/Markdown as YAML nodes and rejected the file.
  • Fix: collapse both template literals to single-line strings with explicit \n escapes so every source line in the script stays within the 12-space YAML block indentation.
  • Also fixes a subtle off-by-one: the original collapsed body was missing \n before ${linkCheckSection}, which would have dropped the blank line before --- when no lychee report is present.

Test plan

  • Workflow run triggered by this PR's push should show jobs actually starting (not instant 0s failure)
  • build job completes: Jekyll builds successfully, lychee link check runs
  • preview-comment job posts a "📚 Documentation Preview" comment on this PR
  • Link check section renders correctly when lychee report is present
  • After merge to main, deploy job publishes to GitHub Pages

Multi-line JS template literals in the `script: |` block contained
content at column 0 (e.g. `<details>`, plain prose), which fell below
the 12-space YAML block scalar indentation threshold and terminated the
script block early. GitHub could not parse the workflow file, causing
every docs workflow run to fail immediately since 2026-02-25.

Fix: collapse `linkCheckSection` and `body` template literals to
single-line strings with explicit `\n` escapes so all content stays
within the YAML block scalar's indentation level.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@claude
Copy link

claude bot commented Mar 16, 2026

📚 Documentation Preview

The documentation has been built successfully.

To preview locally:

  1. Download the github-pages artifact from this workflow run
  2. Extract and serve with any static file server:
    cd artifact && python -m http.server 8000
  3. Open http://localhost:8000/deepcitation/

⚠️ Link Check Results

Click to expand link check report

Summary

Status Count
🔍 Total 391
✅ Successful 336
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 20
❓ Unknown 0
🚫 Errors 35

Errors per input

Errors in docs/_site/api-reference.html

Errors in docs/_site/types.html

Errors in docs/_site/getting-started.html

Errors in docs/_site/verification-statuses.html

Errors in docs/_site/frameworks/langchain.html

Errors in docs/_site/frameworks/vercel-ai-sdk.html

Errors in docs/_site/components.html

Errors in docs/_site/index.html

Errors in docs/_site/frameworks/index.html

Errors in docs/_site/frameworks/nextjs.html

Errors in docs/_site/CONTRIBUTING.html

Errors in docs/_site/error-handling.html

  • [404] https://fonts.gstatic.com/ | Failed: Network error: Not Found
  • [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/api-reference.md | Failed: Cannot find file
  • [404] https://fonts.googleapis.com/ | Failed: Network error: Not Found
  • [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/getting-started.md | Failed: Cannot find file
  • [ERR] file:///home/runner/work/deepcitation/deepcitation/docs/_site/styling.md | Failed: Cannot find file

Errors in docs/_site/code-examples.html

Errors in docs/_site/styling.html

Errors in docs/_site/404.html

Errors in docs/_site/curl-guide.html


Workflow run: 23135460134

@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

❌ Playwright Test Report

Status: Tests failed

📊 Download Report & Snapshots (see Artifacts section)

What's in the Visual Snapshots

The gallery includes visual snapshots for:

  • 🖥️ Desktop showcase (all variants × all states)
  • 📱 Mobile showcase (iPhone SE viewport)
  • 📟 Tablet showcase (iPad viewport)
  • 🔍 Popover states (verified, partial, not found)
  • 🔗 URL citation variants

Run ID: 23135460145

Benson and others added 2 commits March 16, 2026 15:48
v3.0.1 (56afc609) internally called actions/upload-artifact@v4 (tag-only),
violating the repo's "all actions must be pinned to full SHA" enforcement.
v4.0.0 (7b1f4a76) pins its internal upload-artifact call to the full commit
SHA, satisfying the policy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bensonwong bensonwong merged commit 87b353d into main Mar 16, 2026
1 check passed
@bensonwong bensonwong deleted the fix/docs-workflow-yaml-parse-error branch March 16, 2026 08:52
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