Merge pull request #241 from TyndaleLym/feature/generative-data-download #59
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
| name: Deploy VitePress to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'docs/**' | |
| - 'package.json' | |
| - 'CHANGELOG.md' | |
| - '.github/workflows/deploy.yml' | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Sync CHANGELOG to docs | |
| run: | | |
| # 复制 CHANGELOG.md 到中英文文档目录 | |
| cp CHANGELOG.md docs/zh/community/changelog.md | |
| cp CHANGELOG.md docs/en/community/changelog.md | |
| echo "✅ CHANGELOG.md synced to docs directories" | |
| - name: Build VitePress site | |
| run: npm run docs:build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs/.vitepress/dist |