name: mdBook on: push: branches: [main] pull_request: branches: [main] workflow_dispatch: permissions: contents: read pages: write id-token: write concurrency: group: pages cancel-in-progress: false env: # Repo path on GitHub Pages. Forwarded to scripts/build-site.sh so # per-version SITE_URLs are correct. Change here if the repo moves. SITE_BASE: /meshcore-spec jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Install mise uses: jdx/mise-action@v2 with: install: false cache: true - name: Trust mise config run: mise trust - name: Install pinned tools (mdbook, just) run: mise install - name: Configure Pages uses: actions/configure-pages@v5 - name: Build full multi-version site run: just build-site - name: Upload Pages artifact uses: actions/upload-pages-artifact@v3 with: path: ./_site deploy: if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' 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@v4