fix: fix code review #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 Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "docs/**" | |
| - "specs/**" | |
| - "scripts/spec-doc/**" | |
| - "README.md" | |
| - "CONTRIBUTING.md" | |
| - "CODE_OF_CONDUCT.md" | |
| - "server/**/README*.md" | |
| - "server/**/DEVELOPMENT.md" | |
| - "components/**/README*.md" | |
| - "components/**/DEVELOPMENT.md" | |
| - "sdks/**/README*.md" | |
| - "sandboxes/**/README*.md" | |
| - "kubernetes/**/README*.md" | |
| - "examples/**/README*.md" | |
| - "specs/**/README*.md" | |
| - "oseps/**/*.md" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Setup Node 22 | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.15.0 | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install docs dependencies | |
| working-directory: docs | |
| run: pnpm install --frozen-lockfile | |
| - name: Build docs | |
| working-directory: docs | |
| env: | |
| # Use root base when custom domain is configured via CNAME. | |
| DOCS_BASE: ${{ hashFiles('docs/public/CNAME') != '' && '/' || steps.pages.outputs.base_path }} | |
| run: pnpm docs:build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |