Skip to content

Commit

Permalink
Update GitHub Actions config (#471)
Browse files Browse the repository at this point in the history
* Update GitHub Actions config

* Update publish-docs.yml
  • Loading branch information
lambda-fairy authored Feb 4, 2025
1 parent fb193d3 commit 356f477
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ jobs:
steps:

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
profile: minimal
override: true
components: clippy

# Do *not* use `--all-features` here, as the optional dependencies take a
Expand All @@ -42,17 +39,14 @@ jobs:
steps:

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# Documentation build uses `git describe` which requires history
fetch-depth: 0

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
profile: minimal
override: true
components: clippy

- name: Build documentation
Expand All @@ -68,14 +62,10 @@ jobs:
steps:

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
uses: dtolnay/rust-toolchain@nightly

- name: Doctest
run: cd doctest && cargo test
Expand All @@ -87,15 +77,12 @@ jobs:
steps:

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust
uses: actions-rs/toolchain@v1
# Nightly rustfmt is needed for the `imports_granularity` option
uses: dtolnay/rust-toolchain@nightly
with:
# Nightly rustfmt is needed for the `imports_granularity` option
toolchain: nightly
profile: minimal
override: true
components: rustfmt

- name: Check formatting
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,20 @@ jobs:
steps:

- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: '${{ github.event.inputs.ref }}'
# Documentation build uses `git describe` which requires history
fetch-depth: 0

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
uses: dtolnay/rust-toolchain@nightly

- name: Build documentation
run: cd docs && make -j$(nproc)

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/site
Expand Down

0 comments on commit 356f477

Please sign in to comment.