Repository navigation
docs: professional bilingual documentation restructuring v0.2.0 #6
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 Docs | |
| on: | |
| pull_request: | |
| paths: | |
| - "README.md" | |
| - "README.zh-CN.md" | |
| - "SUMMARY.md" | |
| - "docs/**" | |
| - "changelog/**" | |
| - "book.json" | |
| - "package.json" | |
| - "package-lock.json" | |
| - ".github/workflows/pages.yml" | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - "README.md" | |
| - "README.zh-CN.md" | |
| - "SUMMARY.md" | |
| - "docs/**" | |
| - "changelog/**" | |
| - "book.json" | |
| - "package.json" | |
| - "package-lock.json" | |
| - ".github/workflows/pages.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| README.md | |
| README.zh-CN.md | |
| SUMMARY.md | |
| book.json | |
| package.json | |
| package-lock.json | |
| docs | |
| changelog | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| - name: Install docs dependencies | |
| run: npm ci | |
| - name: Build docs | |
| run: npm run docs:build | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: _site | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |