Skip to content

Build and host docs via github action #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Docs

on:
push:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there also a trigger for "on successful build/checks"? That would probably be better than on every push.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only trigger on pushes to the master branch, so after a PR has been merged. At that point the checks should have already passed. Another option is to rebuild the docs on releases, but at least for now I think it's helpful to have the docs track master.

See also the workflow syntax docs and event descriptions.

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/
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down