-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Smithsonian/apidocs
README update and apidocs build via GitHub Actions
- Loading branch information
Showing
9 changed files
with
193 additions
and
2,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: API Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'src/**' | ||
- 'docs/**' | ||
- '.github/workflows/docs.yml' | ||
|
||
pull_request: | ||
paths: | ||
- 'src/**' | ||
- 'docs/**' | ||
- '.github/workflows/docs.yml' | ||
|
||
jobs: | ||
|
||
apidocs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Check out smax-python | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Sphinx and RTM theme | ||
run: pip install sphinx sphinx-rtd-theme | ||
|
||
- name: Build docs | ||
run: | | ||
cd docs | ||
sphinx-apidoc -o . ../src/smax | ||
sphinx-build -M html . . | ||
- name: Checkout gh-pages | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: 'gh-pages' | ||
path: site | ||
|
||
- name: copy docs to gh-pages | ||
run: cp -a docs/html/* site/ | ||
|
||
- name: Push to pages | ||
run: | | ||
cd site | ||
git config --global user.email "$GITHUB_JOB+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions" | ||
git add -A | ||
git commit -m "[automated site update]" && git push || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# For the full list of built-in configuration values, see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
import sys | ||
import os | ||
sys.path.insert(0, os.path.abspath('../src/')) | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'smax' | ||
copyright = '2024, Center for Astrohysics | Harvard & Smithsonian' | ||
author = 'Paul Grimes, Christopher Moriarty, Robert Wilson' | ||
release = '1.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon' ] | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_static_path = ['_static'] |
Oops, something went wrong.