From f2053894ab51c84c28206a785d9f6de570dac0e1 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:05:39 +0100 Subject: [PATCH 1/7] Run full check and save cache --- .github/workflows/ci.yml | 2 +- ci/linkcheck.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 006bcce44..b90688e01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -62,7 +62,7 @@ jobs: - name: Save cached Linkcheck id: cache-linkcheck-save - if: ${{ !cancelled() && github.event_name == 'schedule' }} + if: ${{ !cancelled() }} uses: actions/cache/save@v4 with: path: book/linkcheck/cache.json diff --git a/ci/linkcheck.sh b/ci/linkcheck.sh index e5184839b..cde4549c2 100755 --- a/ci/linkcheck.sh +++ b/ci/linkcheck.sh @@ -15,7 +15,7 @@ if [ -z "$ENABLE_LINKCHECK" ] ; then fi # https://docs.github.com/en/actions/reference/environment-variables -if [ "$GITHUB_EVENT_NAME" = "schedule" ] ; then # running in scheduled job +if [ "$GITHUB_EVENT_NAME" = "pull_request" ] ; then # running in scheduled job FLAGS="" USE_TOKEN=1 From a18b6f9aaef92455407ca9006a0892b793a51e81 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:07:28 +0100 Subject: [PATCH 2/7] Bump CI --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b90688e01..10fe7d126 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,6 +60,7 @@ jobs: - name: Check build run: ENABLE_LINKCHECK=1 mdbook build + - name: Save cached Linkcheck id: cache-linkcheck-save if: ${{ !cancelled() }} From aa7576812af16269beba335d0c262187a1288f36 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:07:54 +0100 Subject: [PATCH 3/7] Bump CI --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 10fe7d126..7609abf4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,6 @@ jobs: key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }} - name: Restore cached Linkcheck - if: github.event_name == 'schedule' id: cache-linkcheck-restore uses: actions/cache/restore@v4 with: @@ -60,7 +59,7 @@ jobs: - name: Check build run: ENABLE_LINKCHECK=1 mdbook build - + - name: Save cached Linkcheck id: cache-linkcheck-save if: ${{ !cancelled() }} From 544ff16a624a43f181d10fb368ef095c3fa84140 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:10:33 +0100 Subject: [PATCH 4/7] Bump CI --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7609abf4e..7a7377407 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,6 @@ jobs: - name: Check build run: ENABLE_LINKCHECK=1 mdbook build - - name: Save cached Linkcheck id: cache-linkcheck-save if: ${{ !cancelled() }} From 461c76a62132a275ce0622abf4b2bcd7d6a784b8 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:17:21 +0100 Subject: [PATCH 5/7] CI: use restore keys --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7a7377407..3462b2470 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,9 @@ jobs: uses: actions/cache/restore@v4 with: path: book/linkcheck/cache.json - key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }} + key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }} + restore-keys: | + linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}-- - name: Install latest nightly Rust toolchain if: steps.mdbook-cache.outputs.cache-hit != 'true' @@ -65,7 +67,7 @@ jobs: uses: actions/cache/save@v4 with: path: book/linkcheck/cache.json - key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }} + key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ github.run_id }} - name: Deploy to gh-pages if: github.event_name == 'push' From 542d8cef662649a020e284f7f25dbb4e3dac2618 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:18:25 +0100 Subject: [PATCH 6/7] Bump CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3462b2470..e8b644094 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: cargo install mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }} cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }} cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }} - + - name: Check build run: ENABLE_LINKCHECK=1 mdbook build From ca79f93fd72998dfc676e28b4aab4e169c367c1c Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Sat, 25 Jan 2025 18:19:16 +0100 Subject: [PATCH 7/7] Bump CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8b644094..3462b2470 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,7 +57,7 @@ jobs: cargo install mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }} cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }} cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }} - + - name: Check build run: ENABLE_LINKCHECK=1 mdbook build