Skip to content

add RwLockExt trait (#5435) #898

add RwLockExt trait (#5435)

add RwLockExt trait (#5435) #898

Workflow file for this run

name: netlify-build
on:
push:
branches:
- main
pull_request:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
guide-build:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.prepare_tag.outputs.tag_name }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- uses: dtolnay/rust-toolchain@nightly
- name: Setup mdBook
uses: taiki-e/install-action@v2
with:
tool: mdbook, mdbook-linkcheck
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
# setup lychee but don't run it yet
args: --version
lycheeVersion: nightly
- name: Prepare tag
id: prepare_tag
run: |
TAG_NAME="${GITHUB_REF##*/}"
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
# This builds the book in target/guide/.
- name: Build the guide
run: |
python -m pip install --upgrade pip && pip install nox[uv]
nox -s ${{ github.event_name == 'release' && 'build-guide' || 'check-guide' }}
env:
PYO3_VERSION_TAG: ${{ steps.prepare_tag.outputs.tag_name }}
# allows lychee to get better rate limits from github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 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
if: ${{ github.event_name == 'release' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/guide/
destination_dir: ${{ steps.prepare_tag.outputs.tag_name }}
full_commit_message: "Upload documentation for ${{ steps.prepare_tag.outputs.tag_name }}"
- name: Get current PyO3 version
run: |
PYO3_VERSION=$(cargo search pyo3 --limit 1 | head -1 | tr -s ' ' | cut -d ' ' -f 3 | tr -d '"')
echo "PYO3_VERSION=${PYO3_VERSION}" >> $GITHUB_ENV
- name: Build the site
run: |
python -m pip install --upgrade pip && pip install nox[uv] towncrier requests
nox -s build-netlify-site -- ${{ (github.ref != 'refs/heads/main' && '--preview') || '' }}
# Upload the built site as an artifact for deploy workflow to consume
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: site
path: ./netlify_build