name: "Docs" on: workflow_dispatch: pull_request: push: branches: - main env: RUST_BACKTRACE: 1 CARGO_TERM_COLOR: always CLICOLOR: 1 CLICOLOR_FORCE: 1 permissions: contents: read # Only allow one run of the workflow per branch / PR at a time. concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: # Generate docs content generate-docs: name: "Generate usage docs" runs-on: ubuntu-26.04 steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Set up rust toolchain run: rustup toolchain install --profile minimal - name: Enable cargo cache uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3 - name: Create dirs run: mkdir -p ./md ./man - name: Build markdown info run: cargo xtask gen docs markdown --out ./md/brush.md - name: Upload markdown docs uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: docs-markdown path: md - name: Build man pages run: cargo xtask gen docs man --output-dir ./man - name: Upload man pages uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: docs-man path: man