doc: wrap raw absolute hrefs in withBase() #3
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 site | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - 'docs/**' | |
| - '.github/workflows/docs.yml' | |
| - 'package.json' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Don't pile up parallel deploys — cancel in-progress runs when a new | |
| # commit lands, but let an in-flight publish finish (skip-then-queue). | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build VitePress site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # lastUpdated needs full git history | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: npm | |
| # Repo .npmrc disables postinstall scripts for safety; CI is a | |
| # controlled env where esbuild's platform binary fetch is needed. | |
| - name: Install dependencies | |
| env: | |
| npm_config_ignore_scripts: 'false' | |
| run: npm install --legacy-peer-deps --include=optional | |
| - name: Build site | |
| run: npm run docs:build | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs/.vitepress/dist | |
| deploy: | |
| name: Deploy to GitHub Pages | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |