Skip to content

Commit

Permalink
☕ Use pre-build binaries for mdbook and mdbook-alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Sep 26, 2024
1 parent 8ac976c commit 726772c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,22 @@ jobs:
MDBOOK_VERSION: 0.4.36
steps:
- uses: actions/checkout@v4
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --force --version ${MDBOOK_VERSION} mdbook
cargo install --force mdbook-alerts

- name: Install mdbook and cargo-binstall binaries
uses: taiki-e/install-action@v2
with:
tool: mdbook,cargo-binstall

- name: Install mdbook extensions
run: cargo binstall -y mdbook-alerts

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build with mdBook
run: mdbook build

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/cache@v4
with:
path: |
Expand All @@ -26,18 +27,24 @@ jobs:
target/
.tools/
key: ${{ runner.os }}-cargo

- uses: denoland/[email protected]
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Install mdBook
run: |
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf -y | sh
rustup update
cargo install --force --version ${MDBOOK_VERSION} mdbook
cargo install --force mdbook-alerts

- name: Install mdbook and cargo-binstall binaries
uses: taiki-e/install-action@v2
with:
tool: mdbook,cargo-binstall

- name: Install mdbook extensions
run: cargo binstall -y mdbook-alerts

- name: Build with mdBook
run: mdbook build

- name: Format
run: deno fmt --check

- name: Misspell
uses: reviewdog/[email protected]

0 comments on commit 726772c

Please sign in to comment.