name: Build PR Documentation

on:
  pull_request:
    paths:
      - "docs/**"
      - "bindings/python/py_src/**"
      - ".github/workflows/build_pr_documentation.yml"

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  build:
    uses: huggingface/doc-builder/.github/workflows/build_pr_documentation.yml@2430c1ec91d04667414e2fa31ecfc36c153ea391  # main
    with:
      commit_sha: ${{ github.event.pull_request.head.sha }}
      pr_number: ${{ github.event.number }}
      package: safetensors
      package_path: safetensors/bindings/python/
      version_tag_suffix: bindings/python/py_src/
      install_rust: true
