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

Build documentation via tox #36

Merged
merged 3 commits into from
Jan 13, 2025
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
28 changes: 28 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,31 @@ jobs:
echo $! > ccompass_pid.txt
sleep 10
kill $(cat ccompass_pid.txt)

test_docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Cache tox
uses: actions/cache@v4
with:
path: ~/.cache/tox
key: ${{ runner.os }}-tox-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-tox-

- name: Install dependencies
run: |
pip install tox

- name: Build documentation
run: |
tox -e doc
1 change: 1 addition & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_build
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/conf.py → doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "alabaster"
html_static_path = ["_static"]
# html_static_path = ["_static"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 12 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,15 @@ requires-python = ">=3.10"
ccompass = "ccompass.CCMPS:main"

[project.optional-dependencies]
dev = ["pre-commit>=3"]
dev = ["pre-commit>=3", "tox"]
doc = ["sphinx", "sphinx-rtd-theme"]

[tool.tox]
requires = ["tox>=4.19"]
env_list = ["doc"]

[tool.tox.env.doc]
description = "Build the documentation"
extras = ["doc"]
commands = [["sphinx-build", "-W", "-b", "html", "doc/", "doc/_build/html"]]
working_directory = "doc"
Loading