name: Website on: push: branches: - master paths: - 'docs/**' - 'include/**' - '.github/workflows/pages.yml' pull_request: branches: - master paths: - 'docs/**' - 'include/**' - '.github/workflows/pages.yml' workflow_dispatch: concurrency: group: website-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: build: name: Build website runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@v6 - name: Set up Node.js uses: actions/setup-node@v6 with: node-version: 24 cache: npm cache-dependency-path: docs/package-lock.json - name: Install Doxygen run: | sudo apt-get update sudo apt-get install --yes --no-install-recommends doxygen graphviz - name: Install website dependencies working-directory: docs run: npm ci - name: Build website and API reference working-directory: docs run: npm run build - name: Check website artifact run: | test -f docs/.vitepress/dist/index.html test -f docs/.vitepress/dist/codedoc/html/index.html - name: Configure GitHub Pages if: github.event_name != 'pull_request' uses: actions/configure-pages@v5 - name: Upload GitHub Pages artifact if: github.event_name != 'pull_request' uses: actions/upload-pages-artifact@v4 with: path: docs/.vitepress/dist deploy: name: Deploy website if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' needs: build runs-on: ubuntu-latest 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@v4