From b4297e729f98e2b44b47019157c0de6577996786 Mon Sep 17 00:00:00 2001 From: Noah Lev Date: Thu, 9 Jan 2025 13:24:42 -0800 Subject: [PATCH] ci: Remove incorrect use of `continue-on-error` This will cause the CI build to be marked successful even if the build failed. Instead, use `if: '!cancelled()'` to always save the cache (except when the job is cancelled), even if the linkcheck failed. See https://stackoverflow.com/a/58859404 for more. --- src/doc/rustc-dev-guide/.github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/doc/rustc-dev-guide/.github/workflows/ci.yml b/src/doc/rustc-dev-guide/.github/workflows/ci.yml index 3c45ad164881..006bcce44b3d 100644 --- a/src/doc/rustc-dev-guide/.github/workflows/ci.yml +++ b/src/doc/rustc-dev-guide/.github/workflows/ci.yml @@ -59,11 +59,10 @@ jobs: - name: Check build run: ENABLE_LINKCHECK=1 mdbook build - continue-on-error: true - name: Save cached Linkcheck id: cache-linkcheck-save - if: github.event_name == 'schedule' + if: ${{ !cancelled() && github.event_name == 'schedule' }} uses: actions/cache/save@v4 with: path: book/linkcheck/cache.json