Merge pull request #2030 from marxin/ci-cache
Save linkcheck cache always
This commit is contained in:
commit
610e80b95c
|
|
@ -35,12 +35,13 @@ jobs:
|
||||||
~/.cargo/bin
|
~/.cargo/bin
|
||||||
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
|
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK2_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}
|
||||||
|
|
||||||
- name: Cache linkcheck
|
- name: Restore cached Linkcheck
|
||||||
uses: actions/cache@v4
|
if: github.event_name == 'schedule'
|
||||||
|
id: cache-linkcheck-restore
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: book/linkcheck/cache.json
|
||||||
~/book/linkcheck
|
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
|
||||||
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}
|
|
||||||
|
|
||||||
- name: Install latest nightly Rust toolchain
|
- name: Install latest nightly Rust toolchain
|
||||||
if: steps.mdbook-cache.outputs.cache-hit != 'true'
|
if: steps.mdbook-cache.outputs.cache-hit != 'true'
|
||||||
|
|
@ -58,6 +59,15 @@ jobs:
|
||||||
|
|
||||||
- name: Check build
|
- name: Check build
|
||||||
run: ENABLE_LINKCHECK=1 mdbook build
|
run: ENABLE_LINKCHECK=1 mdbook build
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Save cached Linkcheck
|
||||||
|
id: cache-linkcheck-save
|
||||||
|
if: github.event_name == 'schedule'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: book/linkcheck/cache.json
|
||||||
|
key: linkcheck--${{ env.MDBOOK_LINKCHECK2_VERSION }}
|
||||||
|
|
||||||
- name: Deploy to gh-pages
|
- name: Deploy to gh-pages
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,9 @@ exclude = [
|
||||||
# 500 is returned for HEAD request
|
# 500 is returned for HEAD request
|
||||||
"code\\.visualstudio\\.com/docs/editor/tasks",
|
"code\\.visualstudio\\.com/docs/editor/tasks",
|
||||||
]
|
]
|
||||||
cache-timeout = 86400
|
# The scheduled CI runs every day and so we need to reuse a part of the cache
|
||||||
|
# in order to face "Server returned 429 Too Many Requests" errors for github.com.
|
||||||
|
cache-timeout = 90000
|
||||||
warning-policy = "error"
|
warning-policy = "error"
|
||||||
|
|
||||||
[output.html.redirect]
|
[output.html.redirect]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue