Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 57d1e6b

Browse files
committed
Save linkcheck cache always
1 parent 7d59cb3 commit 57d1e6b

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ jobs:
3535
~/.cargo/bin
3636
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
3737

38-
- name: Cache linkcheck
39-
uses: actions/cache@v4
38+
- name: Restore cached Linkcheck
39+
if: github.event_name == 'schedule'
40+
id: cache-linkcheck-restore
41+
uses: actions/cache/restore@v4
4042
with:
41-
path: |
42-
~/book/linkcheck
43-
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}
43+
path: book/linkcheck/cache.json
44+
key: linkcheck
4445

4546
- name: Install latest nightly Rust toolchain
4647
if: steps.mdbook-cache.outputs.cache-hit != 'true'
@@ -57,7 +58,16 @@ jobs:
5758
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
5859
5960
- name: Check build
60-
run: ENABLE_LINKCHECK=1 mdbook build
61+
run: mdbook build
62+
continue-on-error: true
63+
64+
- name: Save cached Linkcheck
65+
id: cache-linkcheck-save
66+
if: github.event_name == 'schedule'
67+
uses: actions/cache/save@v4
68+
with:
69+
path: book/linkcheck/cache.json
70+
key: linkcheck
6171

6272
- name: Deploy to gh-pages
6373
if: github.event_name == 'push'

‎book.toml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ exclude = [
5252
# 500 is returned for HEAD request
5353
"code\\.visualstudio\\.com/docs/editor/tasks",
5454
]
55-
cache-timeout = 86400
55+
# The scheduled CI runs every day and so we need to reuse a part of the cache
56+
# in order to face "Server returned 429 Too Many Requests" errors for github.com.
57+
cache-timeout = 90000
5658
warning-policy = "error"
5759

5860
[output.html.redirect]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /