# Builds the documentation site (Docs-Site) and publishes it to GitHub Pages. # Enable Pages with "GitHub Actions" as the source in the repository settings. name: Docs on: push: branches: [main] paths: ["Docs-Site/**", ".github/workflows/docs.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: - uses: actions/checkout@v4 with: fetch-depth: 0 # "last updated" dates come from git history - uses: actions/setup-node@v4 with: node-version: 24 cache: npm - run: npm ci - name: Build env: # Project sites live under //. DOCS_BASE: /${{ github.event.repository.name }}/ run: npm run build:docs # Pages exists only on GitHub; elsewhere this workflow checks the build. - uses: actions/upload-pages-artifact@v3 if: github.server_url == 'https://github.com' with: path: Docs-Site/.vitepress/dist deploy: needs: build if: github.server_url == 'https://github.com' runs-on: ubuntu-latest environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} steps: - id: deployment uses: actions/deploy-pages@v4