name: Deploy Docs to GitHub Pages on: workflow_call: workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: false jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 - uses: actions/setup-node@v6 with: node-version-file: .nvmrc cache: pnpm - run: pnpm install --frozen-lockfile - name: Build docs run: pnpm -C docs run build env: VITEPRESS_BASE: /${{ github.event.repository.name }}/ - name: Upload artifact uses: actions/upload-pages-artifact@v5 with: path: docs/.vitepress/dist deploy: if: github.ref == 'refs/heads/main' 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@v5