diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 644bac8..a146cc7 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -32,6 +32,23 @@ jobs: run: | ruff check textparser tests + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.14" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r docs/requirements.txt + pip install -e . + - name: Build documentation + run: | + python -m sphinx -b html -Ean --keep-going docs build + release: needs: [test] runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index ba74660..013993b 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ docs/_build/ # PyBuilder target/ + +# setuptools_scm +textparser/version.py diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..4942041 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,28 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the version of Python and other tools you might need +build: + os: ubuntu-24.04 + tools: + python: "3.14" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +# If using Sphinx, optionally build your docs in additional formats such as PDF +formats: + - pdf + - epub + +# Optionally declare the Python requirements required to build your docs +python: + install: + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..710334c --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1,2 @@ +Sphinx==9.* +sphinx_rtd_theme