File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 3939 TAG_NAME="${GITHUB_REF##*/}"
4040 echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
4141
42+ - name : Restore lychee cache
43+ id : restore-cache
44+ uses : actions/cache/restore@v4
45+ with :
46+ path : .lycheecache
47+ key : lychee
48+
4249 # This builds the book in target/guide/.
4350 - name : Build the guide
4451 run : |
4956 # allows lychee to get better rate limits from github
5057 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
5158
59+ - name : Save lychee cache
60+ uses : actions/cache/save@v4
61+ if : ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
62+ with :
63+ path : .lycheecache
64+ key : ${{ steps.restore-cache.outputs.cache-primary-key }}
65+
5266 # We store the versioned guides on GitHub's gh-pages branch for convenience
5367 # (the full gh-pages branch is pulled in the build-netlify-site step)
5468 - name : Deploy the guide
Original file line number Diff line number Diff line change @@ -28,3 +28,4 @@ coverage.json
2828netlify_build /
2929.nox /
3030.vscode /
31+ .lycheecache
Original file line number Diff line number Diff line change @@ -737,6 +737,8 @@ def check_guide(session: nox.Session):
737737 str (PYO3_GUIDE_SRC ),
738738 * remap_args ,
739739 "--accept=200,429" ,
740+ "--cache" ,
741+ "--max-cache-age=7d" ,
740742 * session .posargs ,
741743 external = True ,
742744 )
@@ -754,6 +756,8 @@ def check_guide(session: nox.Session):
754756 "--accept=200,429" ,
755757 # reduce the concurrency to avoid rate-limit from `pyo3.rs`
756758 "--max-concurrency=32" ,
759+ "--cache" ,
760+ "--max-cache-age=7d" ,
757761 * session .posargs ,
758762 external = True ,
759763 )
You can’t perform that action at this time.
0 commit comments