diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31d2e5a..af23156 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,9 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy + - name: Set up Rust toolchain + run: | + rustup default stable + rustup component add rustfmt clippy - uses: Swatinem/rust-cache@v2 - name: cargo fmt --check @@ -35,7 +36,8 @@ jobs: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable + - name: Set up Rust toolchain + run: rustup default stable - uses: Swatinem/rust-cache@v2 - name: Install uv diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1a82502..4ab993c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,7 +6,9 @@ on: workflow_dispatch: permissions: - contents: write + contents: read + pages: write + id-token: write concurrency: group: docs-${{ github.ref }} @@ -17,24 +19,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: rustup default stable + - uses: astral-sh/setup-uv@v3 + - run: uv python install 3.12 + - run: uv sync --extra docs + - run: uv run mkdocs build + - uses: actions/upload-pages-artifact@v3 with: - fetch-depth: 0 + path: docs/site - - uses: dtolnay/rust-toolchain@stable - - - name: Install uv - uses: astral-sh/setup-uv@v3 - - - name: Set up Python - run: uv python install 3.12 - - - name: Install package + docs deps - run: uv sync --extra docs - - - name: Configure git for gh-pages - run: | - git config user.name "github-actions[bot]" - git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - - - name: Deploy to GitHub Pages - run: uv run mkdocs gh-deploy --force + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 18547c7..b7254ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt, clippy + - name: Set up Rust toolchain + run: | + rustup default stable + rustup component add rustfmt clippy - uses: Swatinem/rust-cache@v2 - name: cargo fmt --check