name: Docs

on:
  push:
    branches-ignore:
    - dependabot/**
    - deepsource**
  pull_request:

jobs:
  docs:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
    - name: Setup Python
      uses: actions/setup-python@v2
      with:
        python-version: '3.10'
        cache: pip
        cache-dependency-path: requirements/*.txt
    - name: Install apt dependencies
      run: |
        sudo apt-get update
        sudo apt-get install -y libgettextpo-dev
    - name: Install dependencies
      run: |
        pip install --upgrade pip wheel
        pip install -r requirements/dev.txt
    - name: Build docs
      run: make docs
