ci: Update documentation workflow to support VitePress - #179
Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the documentation workflow from a Python-based MkDocs/mike setup to VitePress, a Node.js-based static site generator. The workflow now deploys documentation on every push to the main branch instead of only on version tags.
Key changes:
- Replaces Python/uv/mike toolchain with Node.js/npm/VitePress
- Changes trigger from tag-based (
v*) to branch-based (main) deployment - Introduces a two-job workflow (build and deploy) following GitHub Pages best practices with proper permission separation
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| run: uv run mike set-default --push latest | ||
| - uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: .vitepress/dist |
There was a problem hiding this comment.
The artifact path appears to be incorrect. According to the VitePress configuration in .vitepress/config.mts, the srcDir is set to "docs", which means VitePress will build the output to docs/.vitepress/dist, not .vitepress/dist at the repository root. The path should be changed to 'docs/.vitepress/dist' to correctly upload the built documentation artifacts.
| path: .vitepress/dist | |
| path: docs/.vitepress/dist |
| run: git fetch --tags --force | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 'latest' |
There was a problem hiding this comment.
The node-version value 'latest' is not a valid version specifier for actions/setup-node. This action expects a specific version number (e.g., '20', '22', '24') or a semantic version range (e.g., '20.x'). Using 'latest' will likely cause the workflow to fail. Consider using a specific Node.js version like '24' to match the other workflows in this repository.
| node-version: 'latest' | |
| node-version: '24' |
No description provided.