name: Deploy Documentation

on:
  pull_request:
    branches:
      - release

jobs:
  deploy-docs:

    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash -l {0}

    steps:
      - uses: actions/checkout@v2

      # Install dependencies
      - name: Set up Python 3.8
        uses: actions/setup-python@v1
        with:
          python-version: 3.8

      - name: Install dependencies
        run: |
          pip install -r requirements/pip_requirements.txt
          pip install -r requirements/doc_requirements.txt
      # Build the documentation
      - name: Build the documentation
        run: |
          cd docs
          make html
      # Push the documentation's HTML to github-pages
      - name: GitHub Pages action
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./docs/_build/html
          cname: openpnm.org

name: Deploy Documentation

on:
  workflow_dispatch:
  pull_request:
    branches:
      - release

jobs:
  deploy-docs:

    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash -l {0}

    steps:
      - uses: actions/checkout@v2

      # Install dependencies
      - name: Set up Python 3.8
        uses: actions/setup-python@v1
        with:
          python-version: 3.8

      - name: Install dependencies
        run: |
          pip install -r requirements/pip_requirements.txt
          pip install -r requirements/doc_requirements.txt
      # Build the documentation
      - name: Build the documentation
        run: |
          cd docs
          make html
      # Push the documentation's HTML to github-pages
      - name: GitHub Pages action
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./docs/_build/html
          cname: openpnm.org

Add option to docs action to run on demand
Add option to docs action to run on demand