---
name: "Refresh docs build dependencies"
"on":
  schedule:
    # Weekly
    - cron: "0 0 * * 0"
  workflow_dispatch:
    inputs:
      base-branch:
        required: false
        type: string
      pr-branch:
        required: false
        type: string
      reset-branch:
        type: boolean
        default: false
      labels:
        required: false
        type: string

jobs:
  refresh:
    name: "Refresh docs build dependencies"
    uses: ./.github/workflows/reusable-pip-compile.yml
    with:
      message: "ci: refresh docs build dependencies"
      base-branch: "${{ inputs.base-branch || 'devel' }}"
      pr-branch: "${{ inputs.pr-branch || 'pip-compile/devel/docs' }}"
      nox-args: >-
        -e
        'pip-compile(requirements)'
      reset-branch: "${{ inputs.reset-branch || false }}"
      labels: "${{ inputs.labels || 'doc builds,no_backport' }}"
      python-versions: "3.12"
    secrets: inherit
