Skip to content
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

Add workflow to publish docs on Github Pages #4

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
27 changes: 27 additions & 0 deletions .github/workflows/make-sphinx-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: "Make Sphinx Docs"
on:
- workflow_dispatch
- pull_request

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ammaraskar/sphinx-action@master
with:
docs-folder: "docs/"
# We need a .nojekyll file in the root of the gh-pages branch
# to prevent GitHub from ignoring files that begin with an underscore
# See: https://help.github.com/en/articles/files-that-start-with-an-underscore-are-missing
# Also:
# - name: Add .nojekyll file
# run: |
# sudo touch docs/build/html/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs/build/html
clean: true # Automatically remove deleted files from the deploy branch

3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -141,7 +142,7 @@ def setup(app):
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = 'classic'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down