Skip to content

Commit

Permalink
Merge pull request #1 from hartwork/fix-sphinx-build
Browse files Browse the repository at this point in the history
Fix Sphinx build + cover by CI
  • Loading branch information
hartwork authored Oct 13, 2024
2 parents 234d0f3 + 90ad922 commit 6c970b3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/sphinx-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Sphinx build
on: [pull_request, push]
jobs:
docs:
strategy:
matrix:
python-version: [3.8, 3.12] # oldest and most recent version supported
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip3 install \
recommonmark \
sphinx
- name: Build documentation
run: |
make -C docs/ html
- name: Store documentation
uses: actions/upload-artifact@v4
with:
name: "wait_for_it_docs_html_${{ github.sha }}_python_${{ matrix.python-version }}"
path: docs/build/html/
if-no-files-found: error
11 changes: 4 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,17 @@
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"recommonmark",
# 'sphinx.ext.githubpages',
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#

# Enable Markdown
source_parsers = {".md": CommonMarkParser}

source_suffix = [".rst", ".md"]
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
# source_suffix = '.rst'

# The master toctree document.
Expand All @@ -76,7 +73,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -212,7 +209,7 @@
# -- Options for intersphinx extension ---------------------------------------

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {"https://docs.python.org/": None}
intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}

# -- Options for todo extension ----------------------------------------------

Expand Down

0 comments on commit 6c970b3

Please sign in to comment.