fix: gate VitePress docs build in pre-push and PR CI#777
Merged
Conversation
CONTRIBUTING.md used GitHub Actions expression syntax with double braces, which VitePress compiles as Vue interpolation and broke production deploy. Rephrase affected markdown, add docs:site, and run it after npm test in pre-push and pr.yml so docs failures surface before merge. Co-authored-by: Cursor <cursoragent@cursor.com>
Use lefthook v2 group jobs (parallel checks, then piped test + docs:site) instead of the invalid nested jobs map that blocked push. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Pull request overview
This PR prevents VitePress docs-site regressions from reaching production by removing problematic {{ ... }} sequences from published markdown and by gating the docs-site build in both pre-push hooks and PR CI.
Changes:
- Rephrase markdown in
README.md,CONTRIBUTING.md, andAGENTS.mdto avoid VitePress/Vue mustache interpolation pitfalls. - Add a
docs:sitescript (demo generation +vitepress build) and wire it into pre-push and PR CI afternpm test. - Refactor
docs:buildto delegate to the newdocs:sitescript.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Removes {{ ... }} placeholders from prose to avoid VitePress/Vue interpolation issues. |
| package.json | Adds docs:site and wires docs:build through it. |
| lefthook.yml | Runs docs-site build after tests in pre-push; keeps typecheck/depcheck parallelized. |
| CONTRIBUTING.md | Documents the new docs validation step and warns about VitePress mustache parsing. |
| AGENTS.md | Mirrors the VitePress/mustache guidance and the docs-site validation expectation. |
| .github/workflows/pr.yml | Adds a CI step to build the VitePress docs site after npm test. |
- Drop {% raw %} guidance (not configured in VitePress); document HTML
entities or rephrase instead.
- Update stale Git hooks table for the new pre-push sequence.
- Add predocs:site to build dist/cli.mjs when missing so docs:site works
standalone without rebuilding after npm test.
Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Proposed changes
CONTRIBUTING.mdcontained GitHub Actions expression syntax with double braces, which VitePress compiles as Vue interpolation and breaksvitepress build.CONTRIBUTING.mdandREADME.md(andAGENTS.mdfor consistency).npm run docs:site(predocs:site+docs:demo+vitepress build) and run it afternpm testin pre-push (Lefthook) and PR CI so docs-site regressions fail locally before merge.{% raw %}) and update the Git hooks table for the new pre-push sequence.Related issue
N/A — follow-up to #776 production deploy failure.
Dependencies added/removed (if applicable)
Testing
npm run docs:buildfailure onmaster, verified fix passes locallylefthook run pre-pushrunsnpm run docs:siteafternpm testHow to test
npm run docs:buildon this branch — should complete successfully.CONTRIBUTING.mdprose and runnpm run docs:site— should fail (same class of error as the production deploy).dist/,npm run docs:sitealone should succeed viapredocs:site.Test configuration
Checklist