chore: auto-generate cargo patch config for ROS message crates #69
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - dev | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| env: | |
| MDBOOK_VERSION: 0.5.2 | |
| MDBOOK_MERMAID_VERSION: 0.17.0 | |
| jobs: | |
| build: | |
| name: Build mdBook | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Cache mdBook tools | |
| uses: actions/cache@v6 | |
| with: | |
| path: | | |
| ~/.cargo/bin/mdbook | |
| ~/.cargo/bin/mdbook-mermaid | |
| key: >- | |
| mdbook-tools-${{ runner.os }}-${{ env.MDBOOK_VERSION }}-${{ | |
| env.MDBOOK_MERMAID_VERSION }} | |
| - name: Install mdBook | |
| run: | | |
| current="$(mdbook --version 2>/dev/null || true)" | |
| if [ "$current" != "mdbook v${MDBOOK_VERSION}" ]; then | |
| cargo install mdbook --version "${MDBOOK_VERSION}" --locked | |
| fi | |
| - name: Install mdBook Mermaid | |
| run: | | |
| current="$(mdbook-mermaid --version 2>/dev/null || true)" | |
| if [ "$current" != "mdbook-mermaid ${MDBOOK_MERMAID_VERSION}" ]; then | |
| cargo install mdbook-mermaid --version "${MDBOOK_MERMAID_VERSION}" --locked | |
| fi | |
| - name: Build book | |
| run: mdbook build docs | |
| - name: Configure GitHub Pages | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| uses: actions/configure-pages@v6 | |
| - name: Upload GitHub Pages artifact | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: docs/book | |
| deploy: | |
| name: Deploy GitHub Pages | |
| if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | |
| 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 | |
| id: deployment | |
| uses: actions/deploy-pages@v5 |