firma monitor/run: tighten config discovery flows #594
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] | |
| paths: | |
| - "Cargo.lock" | |
| - "Cargo.toml" | |
| - "crates/**" | |
| - "docs-site/**" | |
| - ".github/workflows/docs.yml" | |
| pull_request: | |
| paths: | |
| - "Cargo.lock" | |
| - "Cargo.toml" | |
| - "crates/**" | |
| - "docs-site/**" | |
| - ".github/workflows/docs.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| ASTRO_TELEMETRY_DISABLED: "1" | |
| jobs: | |
| build: | |
| name: Build docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install Rust nightly (required by cargo-doc-md) | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1 | |
| with: | |
| toolchain: nightly | |
| cache: false | |
| rustflags: "" | |
| - name: Install Rust (pinned in rust-toolchain.toml) | |
| uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1 | |
| with: | |
| rustflags: "" | |
| cache-shared-key: docs | |
| - name: Load tool versions | |
| shell: bash | |
| run: grep -E '^[A-Z0-9_]+=' tool-versions.env >> "$GITHUB_ENV" | |
| - name: Install protoc | |
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| version: ${{ env.PROTOC_VERSION }} | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install cargo-doc-md | |
| run: cargo install --locked --version $CARGO_DOC_MD_VERSION cargo-doc-md | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: 10.30.3 | |
| run_install: false | |
| - name: Set up Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: pnpm | |
| cache-dependency-path: docs-site/pnpm-lock.yaml | |
| registry-url: https://registry.npmjs.org | |
| - name: Install docs dependencies | |
| run: pnpm install --frozen-lockfile --registry=https://registry.npmjs.org/ | |
| working-directory: docs-site | |
| - name: Build Starlight site (with Rust API) | |
| run: pnpm run build:with-rustdoc | |
| working-directory: docs-site | |
| env: | |
| GITHUB_PAGES: "true" | |
| - name: Upload Pages artifact | |
| if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: docs-site/dist | |
| deploy: | |
| name: Deploy docs | |
| needs: build | |
| if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deploy.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deploy | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |