chore: sync translated docs (#134) #601
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
| # Customized workflow for building and deploying a VitePress site to GitHub Pages | |
| name: Deploy VitePress site to Pages | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| # Separate group per ref so PR build checks never queue ahead of a production | |
| # deploy (they previously shared one serialized `pages` group). PRs cancel | |
| # their own superseded runs; pushes to main never cancel an in-progress deploy. | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.11 | |
| - name: Check Bun version | |
| run: bun --version | |
| - name: Setup GitHub Pages | |
| uses: actions/configure-pages@v6 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build VitePress site | |
| run: bun run docs:build | |
| - name: List build directory contents | |
| run: ls -la docs/.vitepress/dist | |
| - name: Upload site artifact | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |