From 6fe2608994cd01904b30072d175a0a3fb4475d6c Mon Sep 17 00:00:00 2001 From: nomicon-kr Date: Sat, 22 Jun 2024 12:50:59 +0900 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 40 +++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7ace896..7f50d06 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,29 +7,29 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Update rustup - run: rustup self update - - name: Install Rust - run: | - rustup set profile minimal - rustup toolchain install nightly -c rust-docs - rustup default nightly + - name: Setup Rust Toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1.9.0 + with: + toolchain: nightly + - name: Install mdbook - env: - MDBOOK_VER: v0.4.3 - run: | - mkdir bin - curl -sSL https://github.com/rust-lang/mdBook/releases/download/${{ env.MDBOOK_VER }}/mdbook-${{ env.MDBOOK_VER }}-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin - echo "$(pwd)/bin" >> $GITHUB_PATH - - name: Report versions - run: | - rustup --version - rustc -Vv - mdbook --version + run: cargo install mdbook + - name: Run tests run: mdbook test - - name: Check for broken links + + - name: Cache/Restore linkcheck + id: cache + uses: actions/cache@v4.0.2 + with: + path: ${GITHUB_WORKSPACE}/linkcheck.sh + key: linkcheck-${{ runner.os }} + + - name: Install linkcheck + if: steps.cache.outputs.cache-hit != 'true' run: | curl -sSLo linkcheck.sh \ https://raw.githubusercontent.com/rust-lang/rust/master/src/tools/linkchecker/linkcheck.sh - sh linkcheck.sh --all nomicon + + - name: Check links + run: sh linkcheck.sh --all nomicon