diff --git a/.github/workflows/docs-publish.yml b/.github/workflows/docs-publish.yml new file mode 100644 index 0000000..cca899b --- /dev/null +++ b/.github/workflows/docs-publish.yml @@ -0,0 +1,29 @@ +name: "Sphinx: Render docs" + +on: push + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - name: Build docs + run: | + pip install -r ./docs/source/requirements.txt + pip install -r ./requirements.txt + sphinx-build -M html docs/source docs/build + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: html-docs + path: docs/build/html/ + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html \ No newline at end of file diff --git a/README.md b/README.md index 5e78e10..996c582 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ -[![Documentation Status](https://readthedocs.org/projects/py-spw/badge/?version=latest)](https://pyspw.xstl.ru/ru/latest/?badge=latest) +[![PyPI version](https://badge.fury.io/py/Py-SPW.svg)](https://pypi.org/project/Py-SPW/) +[![python](https://img.shields.io/badge/python-3.7%20%7C%203.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)](https://pypi.org/project/Py-SPW/) + +[![Documentation Status](https://readthedocs.org/projects/py-spw/badge/?version=latest)](https://pyspw.xstl.ru/en/latest/) +[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/teleportx/Py-SPW/blob/main/LICENSE) +[![Downloads](https://img.shields.io/pypi/dm/Py-SPW)](https://pypi.org/project/Py-SPW/) # Py SPW Library for work with [SPWorlds](https://spworlds.ru) API in Python. @@ -31,4 +36,4 @@ print(api.check_access('437610383310716930')) ## Links - [PyPi](https://pypi.org/project/Py-SPW) - [Documentation](https://pyspw.xstl.ru/en/latest/) -- [API](https://github.com/sp-worlds/api-docs) \ No newline at end of file +- [API](https://github.com/sp-worlds/api-docs) diff --git a/docs/source/conf.py b/docs/source/conf.py index 36e6091..38909f4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -5,6 +5,7 @@ import os import sys +from datetime import datetime sys.path.insert(0, os.path.abspath('../..')) @@ -14,7 +15,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'Py-SPW' -copyright = '2023, Teleport' +copyright = f'{datetime.now().year}, Teleport' author = 'Teleport' release = __version__ diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt index 07dd8ee..2ad69cb 100644 --- a/docs/source/requirements.txt +++ b/docs/source/requirements.txt @@ -1 +1,2 @@ +sphinx==5.3.0 furo==2023.3.27 \ No newline at end of file diff --git a/pyspw/__init__.py b/pyspw/__init__.py index 91c2d29..77a66d9 100644 --- a/pyspw/__init__.py +++ b/pyspw/__init__.py @@ -1,3 +1,3 @@ from .api import * -__version__ = '1.5.2' +__version__ = '1.5.3'