docs: 重构文档信息架构,分离仓库入口与文档首页 #2
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: | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - "docs/**" | |
| - "examples/*/README.md" | |
| - "README.md" | |
| - "README.zh-CN.md" | |
| - "DOCS.md" | |
| - "SUMMARY.md" | |
| - "CONTRIBUTING.md" | |
| - "CONTRIBUTING.zh.md" | |
| - "book.json" | |
| - ".gitbook.yaml" | |
| - "package.json" | |
| - "package-lock.json" | |
| - ".github/workflows/pages.yml" | |
| - "changelog/**" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: | | |
| docs | |
| examples/01-cmake-modern/README.md | |
| examples/02-memory-cache/README.md | |
| examples/03-modern-cpp/README.md | |
| examples/04-simd-vectorization/README.md | |
| examples/05-concurrency/README.md | |
| README.md | |
| README.zh-CN.md | |
| DOCS.md | |
| SUMMARY.md | |
| CONTRIBUTING.md | |
| CONTRIBUTING.zh.md | |
| book.json | |
| .gitbook.yaml | |
| package.json | |
| package-lock.json | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install honkit | |
| run: npm ci | |
| - name: Build docs | |
| run: npx honkit build . _site | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: _site | |
| deploy: | |
| 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 |