Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/workflows/docs2gh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Building documentation as gh-pages
on:
push:
branches:
- main

jobs:
build_docs:
name: documentation
runs-on: ubuntu-latest # ${{ matrix.platform }}

steps:
# Checkout the repository and setups the machine to use python
- uses: actions/checkout@v3
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: generates API documentation
# You may not run this step if done locally and the documentation was updated manually
# (and those files committed to the repository)
run: |
pip install sphinx
cd docs
sphinx-apidoc -o . ../sagittal_average
- name: Build and Commit
uses: sphinx-notes/pages@v2
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
import os
import sys
sys.path.insert(0, os.path.abspath('..'))


# -- Project information -----------------------------------------------------
Expand All @@ -35,6 +35,7 @@
'sphinx.ext.coverage', # Automatically check if functions are documented
'sphinx.ext.mathjax', # Allow support for algebra
'sphinx.ext.viewcode', # Include the source code in documentation
'sphinx.ext.githubpages', # Publish HTML docs in GitHub Pages¶
]

# Add any paths that contain templates here, relative to this directory.
Expand Down