name: Build and publish documentation

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8]
      fail-fast: false
    steps:
      - uses: r-lib/actions/setup-pandoc@v1
      - name: Checkout Source
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2

      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install -r requirements-dev.txt
          python setup.py build
          python setup.py install

      - name: Checkout gh-pages
        uses: actions/checkout@v2
        with:
          ref: gh-pages
          path: docs/_build/html

      - name: Build docs
        if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
        run: sphinx-build docs docs/_build

      - name: Publish Docs to gh-pages
        if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/_build/html
          keep_files: true

name: Build and publish documentation

on:
  push:
    branches:
      - master
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.8]
      fail-fast: false
    steps:
      - uses: r-lib/actions/setup-pandoc@v1
      - name: Checkout Source
        uses: actions/checkout@v2
        with:
          fetch-depth: 0

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2

      - name: Install Dependencies
        run: |
          python -m pip install --upgrade pip
          pip install -r requirements.txt
          pip install -r requirements-dev.txt
          python setup.py build
          python setup.py install

      - name: Checkout gh-pages
        uses: actions/checkout@v2
        with:
          ref: gh-pages
          path: docs/_build

      - name: Build docs
        if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
        run: sphinx-build docs docs/_build

      - name: Publish Docs to gh-pages
        if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: docs/_build
          keep_files: true

Fix docs GA atttempt 2
Fix docs GA atttempt 2
