diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..423396ea8d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,23 @@ +name: Docs + +on: + push: + branches: + - master + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-python@v1 + - name: Build docs + run: | + pip install --upgrade tox + tox -e docs + - name: Publish to gh-pages + uses: JamesIves/github-pages-deploy-action@2.0.2 + env: + ACCESS_TOKEN: ${{ secrets.DocsPushToken }} + BRANCH: gh-pages + FOLDER: docs/_build/html/ diff --git a/docs/conf.py b/docs/conf.py index d719ebe931..694ba7f005 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -42,6 +42,9 @@ "sphinx.ext.viewcode", # Link to other sphinx docs "sphinx.ext.intersphinx", + # Add a .nojekyll file to the generated HTML docs + # https://help.github.com/en/articles/files-that-start-with-an-underscore-are-missing + "sphinx.ext.githubpages", ] intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}