fix: allow global CLAUDE.md diff preview (#198) #335
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: pages | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "site/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - ".github/workflows/pages.yml" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "site/**" | |
| - "package.json" | |
| - "package-lock.json" | |
| - ".github/workflows/pages.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Setup Pages | |
| if: github.event_name != 'pull_request' | |
| uses: actions/configure-pages@v5 | |
| with: | |
| enablement: true | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build docs | |
| env: | |
| VITEPRESS_BASE: /${{ github.event.repository.name }}/ | |
| run: npm run docs:build | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site/.vitepress/dist | |
| 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 |