Skip to content
Merged
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
14 changes: 14 additions & 0 deletions .github/workflows/netlify-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
TAG_NAME="${GITHUB_REF##*/}"
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT

- name: Restore lychee cache
id: restore-cache
uses: actions/cache/restore@v4
with:
path: .lycheecache
key: lychee

# This builds the book in target/guide/.
- name: Build the guide
run: |
Expand All @@ -49,6 +56,13 @@ jobs:
# allows lychee to get better rate limits from github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Save lychee cache
uses: actions/cache/save@v4
if: ${{ github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'CI-save-pr-cache') }}
with:
path: .lycheecache
key: ${{ steps.restore-cache.outputs.cache-primary-key }}

# We store the versioned guides on GitHub's gh-pages branch for convenience
# (the full gh-pages branch is pulled in the build-netlify-site step)
- name: Deploy the guide
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ coverage.json
netlify_build/
.nox/
.vscode/
.lycheecache
4 changes: 4 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,8 @@ def check_guide(session: nox.Session):
str(PYO3_GUIDE_SRC),
*remap_args,
"--accept=200,429",
"--cache",
"--max-cache-age=7d",
*session.posargs,
external=True,
)
Expand All @@ -755,6 +757,8 @@ def check_guide(session: nox.Session):
"--accept=200,429",
# reduce the concurrency to avoid rate-limit from `pyo3.rs`
"--max-concurrency=32",
"--cache",
"--max-cache-age=7d",
*session.posargs,
external=True,
)
Expand Down
Loading