# Build the docs and run checks on them

name: Check

on:  # yamllint disable-line rule:truthy
  schedule:
  - cron: '49 18 * * 5'  # 18:49 UTC every Friday, to avoid GHA load spikes

  push:
    branches:
    - master
    - main
    - '*.*'
    - 'staging*'

  pull_request:
    branches:
    - master
    - main
    - '*.*'
    - 'staging*'

  workflow_dispatch:  # yamllint disable-line rule:empty-values

jobs:
  check:
    name: Check Links

    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
    - name: Set up Python
      uses: actions/setup-python@v5
      with:
        python-version: '3.11'
    - name: Install dependencies
      shell: bash
      run: ./ci/install.sh
    - name: List dependencies
      shell: bash
      run: pip list
    - name: Run Linkcheck
      run: nox -s linkcheck
