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 documentation build workflow #551

Merged
merged 6 commits into from
Mar 23, 2023
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
3 changes: 3 additions & 0 deletions .github/workflows/doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enthought-sphinx-theme
sphinx
sphinx-copybutton
26 changes: 26 additions & 0 deletions .github/workflows/test-doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test the documentation build

on: [pull_request, workflow_dispatch]

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: '.github/workflows/doc-requirements.txt'
- run: python -m pip install -r .github/workflows/doc-requirements.txt
- run: python -m pip install .
- run: |
python -m sphinx.ext.apidoc --separate --no-toc -o docs/source/api -t docs/source/api/templates envisage */tests
python -m sphinx -b html -d docs/build/doctrees docs/source docs/build/html
- uses: actions/upload-artifact@v3
with:
name: documentation
path: |
docs/build/
!docs/build/doctrees/
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# All configuration values have a default value; values that are commented out
# serve to show the default value.

import envisage
import importlib.metadata

import enthought_sphinx_theme

# If your extensions are in another directory, add it here. If the directory
Expand Down Expand Up @@ -57,7 +58,7 @@

# The default replacements for |version| and |release|, also used in various
# other places throughout the built documents.
version = release = envisage.__version__
version = release = importlib.metadata.version("envisage")

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand Down