Skip to content

Run full check and save cache #2222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ 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:
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'
Expand All @@ -62,11 +63,11 @@ 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
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'
Expand Down
2 changes: 1 addition & 1 deletion ci/linkcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading