diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a81737f..d90ac89 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -61,6 +61,22 @@ jobs: - name: run django tests run: tox -e ${{ matrix.tox }} + docs: + name: "docs" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pip + - name: install dependencies + run: | + pip install -e . + pip install sphinx -r docs/requirements.txt + - name: build docs + run: sphinx-build -W -b html docs docs/_build/html + typecheck: name: "typecheck" runs-on: ubuntu-latest diff --git a/docs/_static/.gitkeep b/docs/_static/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/conf.py b/docs/conf.py index 22a114c..7a996a6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,6 @@ import sys, os sys.path.append(os.path.abspath('_themes')) +sys.path.append(os.path.abspath('..')) sys.path.append(os.path.abspath('.')) from conf_base import * @@ -7,6 +8,7 @@ #from conf_theme_flask import * -version = '0.5' -release = '0.5.1' +from emails import __version__ as _emails_version +version = '.'.join(_emails_version.split('.')[:2]) +release = _emails_version html_theme_path = ['_themes', ] + html_theme_path diff --git a/docs/conf_base.py b/docs/conf_base.py index affc125..c4f9904 100644 --- a/docs/conf_base.py +++ b/docs/conf_base.py @@ -117,7 +117,6 @@ html_theme_options = { 'github_user': 'lavr', 'github_repo': 'python-emails', - 'travis_button': True } # Theme options are theme-specific and customize the look and feel of a theme @@ -279,4 +278,4 @@ # Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'http://docs.python.org/': None} +intersphinx_mapping = {'python': ('https://docs.python.org/3', None)} diff --git a/docs/conf_theme_alabaster.py b/docs/conf_theme_alabaster.py index 7963f9d..bd4f680 100644 --- a/docs/conf_theme_alabaster.py +++ b/docs/conf_theme_alabaster.py @@ -11,6 +11,5 @@ 'github_user': 'lavr', 'github_repo': 'python-emails', 'github_banner': True, - 'travis_button': True, 'code_font_size': '0.8em' }