name: Deploy Docs to GitHub Pages on: push: branches: [main] paths: - "docs/**" pull_request: paths: - "docs/**" workflow_dispatch: # Allow this job to clone the repo and create a page deployment permissions: contents: read jobs: build: runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout your repository using git uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: persist-credentials: false - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 with: node-version: 24 - name: Install pnpm uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 with: run_install: true - name: Run build run: pnpm build:ci - name: Type-check docs scripts run: pnpm docs:scripts:check - name: Type-check rendered snippets run: pnpm -F docs-code build-check - name: Build docs run: pnpm docs:build - name: Upload docs artifact uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 with: path: docs/dist/ include-hidden-files: true deploy: if: github.event_name == 'push' && github.ref == 'refs/heads/main' needs: build runs-on: ubuntu-latest timeout-minutes: 10 permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346