From 1039a8bef4f3864a2a727ccec96e431d3cd7e835 Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Fri, 21 Jun 2024 12:26:20 +0900 Subject: [PATCH 1/2] ci: mdbook to install from GitHub --- .github/workflows/deploy.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 0194509..f41a704 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -24,11 +24,13 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - - - name: Install mdbook - run: cargo install mdbook + - name: Install mdbook from GitHub + run: | + tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') + url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" + mkdir mdbook + curl -sSL $url | tar -xz --directory=./mdbook + echo `pwd`/mdbook >> $GITHUB_PATH - name: Build with mdbook run: mdbook build From ae234ffddba5f1d504a6f81f6754281fe1f22b58 Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Fri, 21 Jun 2024 22:19:19 +0900 Subject: [PATCH 2/2] ci: using `actions-mdbook` --- .github/workflows/deploy.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f41a704..668e13c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -24,13 +24,10 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v5 - - name: Install mdbook from GitHub - run: | - tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') - url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" - mkdir mdbook - curl -sSL $url | tar -xz --directory=./mdbook - echo `pwd`/mdbook >> $GITHUB_PATH + - name: Install mdbook + uses: peaceiris/actions-mdbook@v2 + with: + mdbook-version: 'latest' - name: Build with mdbook run: mdbook build