name: GitHub Pages site update
on:
  push:
    branches:
    - master
jobs:
  build:
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    permissions:
      id-token: write
      pages: write
    steps:
    - name: Setup python
      uses: actions/setup-python@v6
    - name: Checkout
      uses: actions/checkout@master
      with:
        fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
    - name: Install dependencies
      run: |
        python --version
        python -m pip install --upgrade pip
        python -m pip install -r requirements/requirements.txt
    - name: Build and Deploy
      uses: sphinx-notes/pages@v3
      with:
        requirements_path: ./docs/doc_requirements.txt            
