docs: add Slate architecture analysis #9
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: 部署知识库站点 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'docs/**' | |
| - 'website/**' | |
| - 'sources.json' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: 构建 Docusaurus | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: website | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: website/package-lock.json | |
| - name: 安装依赖 | |
| run: npm ci | |
| - name: 同步文档 | |
| run: npm run sync-docs | |
| - name: 生成标签 | |
| run: npm run generate-tags | |
| - name: 构建站点 | |
| run: npm run build | |
| - name: 上传构建产物 | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: website/build | |
| deploy: | |
| name: 部署到 GitHub Pages | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 部署 | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |