Skip to content

Commit 31f05cc

Browse files
committed
Use cargo-install action
1 parent a526fdf commit 31f05cc

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
with:
2727
deno-version: 2.x
2828

29+
- name: Setup Rust
30+
uses: dtolnay/rust-toolchain@stable
31+
2932
- name: Install mdbook
3033
uses: peaceiris/actions-mdbook@v2
3134
with:
3235
mdbook-version: ${{ env.MDBOOK_VERSION }}
3336

34-
- name: Setup cache
35-
uses: Swatinem/rust-cache@v2
36-
with:
37-
prefix-key: "mdbook-template/gh-actions-cache"
38-
3937
- name: Install mdbook plugins
40-
run: |
41-
cargo install mdbook-pagetoc --version ${{ env.MDBOOK_PAGETOC_VERSION }}
38+
uses: baptiste0928/cargo-install@v3
39+
with:
40+
crate: mdbook-pagetoc
41+
version: ${{ env.MDBOOK_PAGETOC_VERSION }}
4242

4343
- name: Run fmt
4444
run: |

.github/workflows/deploy.yaml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,11 @@ jobs:
3838
with:
3939
mdbook-version: ${{ env.MDBOOK_VERSION }}
4040

41-
- name: Setup cache
42-
uses: Swatinem/rust-cache@v2
43-
with:
44-
prefix-key: "mdbook-template/gh-actions-cache"
45-
4641
- name: Install mdbook plugins
47-
run: |
48-
cargo install mdbook-pagetoc --version ${{ env.MDBOOK_PAGETOC_VERSION }}
42+
uses: baptiste0928/cargo-install@v3
43+
with:
44+
crate: mdbook-pagetoc
45+
version: ${{ env.MDBOOK_PAGETOC_VERSION }}
4946

5047
- name: Build with mdbook
5148
run: mdbook build

0 commit comments

Comments
 (0)