name: Test docs
on:
  pull_request:
    paths:
      - 'docs/**'
      - 'mkdocs.yml'
jobs:
  build-documents:
    name: Documentation Test
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      with:
        fetch-depth: 0
        persist-credentials: true
    - uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
      with:
        python-version: 3.x
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip setuptools wheel
        pip install -r docs/build/requirements.txt
    - name: Configure the git user
      run: |
        git config user.name "knqyf263"
        git config user.email "knqyf263@gmail.com"
    - name: Deploy the dev documents
      run: mike deploy test
