name: Deploy documentation to gh-pages
on:
  push:
    branches:
      - main
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout 🛎️
        uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
        with:
          persist-credentials: false

      - name: Deploy 🚀
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          BRANCH: gh-pages # The branch the action should deploy to.
          FOLDER: docs # The folder the action should deploy.

Add action for deploying docs to GitHub Pages via gh-pages
Add action for deploying docs to GitHub Pages via gh-pages

Since GitHub does not support deploying from any branch other than
master or gh-pages, deploy docs/ from main directly to gh-pages.
