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 1df967c

Browse files
committed
Save/Restore cache only for schedule CI jobs
1 parent ca98813 commit 1df967c

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
3737

3838
- name: Restore cached Linkcheck
39+
if: github.event_name == 'schedule'
3940
id: cache-linkcheck-restore
4041
uses: actions/cache/restore@v4
4142
with:
@@ -57,11 +58,11 @@ jobs:
5758
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
5859
5960
- name: Check build
60-
run: mdbook build || cat book/linkcheck/cache.json
61+
run: mdbook build
6162

6263
- name: Save cached Linkcheck
6364
id: cache-linkcheck-save
64-
if: always()
65+
if: github.event_name == 'schedule'
6566
uses: actions/cache/save@v4
6667
with:
6768
path: book/linkcheck/cache.json

‎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 によって変換されたページ (->オリジナル) /