diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..f00286b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,48 @@ +name: Docs + +on: + push: + branches: + - main + workflow_dispatch: + workflow_call: + +jobs: + build-and-publish: + name: Build and Publish Docs + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + env: + POETRY_VIRTUALENVS_CREATE: false + steps: + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - uses: Gr1N/setup-poetry@v9 + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + + - name: Install Dependencies + run: | + poetry self add "poetry-dynamic-versioning[plugin]" + poetry install --no-root --only=docs + + - name: Build Package + run: poetry build + + - name: Install Package + run: pip install dist/*.whl + + - name: Build & Publish Docs + uses: sphinx-notes/pages@v3 + with: + checkout: false diff --git a/README.rst b/README.rst index 83136ee..213ce4b 100644 --- a/README.rst +++ b/README.rst @@ -6,12 +6,23 @@ webexpythonsdk .. image:: https://img.shields.io/badge/license-MIT-blue.svg :target: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/LICENSE -.. image:: https://img.shields.io/pypi/v/webexpythonsdk.svg + :alt: License MIT +.. image:: https://img.shields.io/pypi/v/webexpythonsdk :target: https://pypi.org/project/webexpythonsdk/ -.. image:: https://img.shields.io/pypi/dw/webexpythonsdk.svg - :target: https://pypi.org/project/webexpythonsdk/ -.. image:: https://readthedocs.org/projects/webexpythonsdk/badge/?version=latest - :target: http://webexpythonsdk.readthedocs.io/en/latest/?badge=latest + :alt: PyPI Version +.. image:: https://img.shields.io/pypi/dw/webexpythonsdk?label=webexpythonsdk + :target: https://pypistats.org/packages/webexpythonsdk + :alt: webexpythonsdk PyPI Downloads +.. image:: https://img.shields.io/pypi/dw/webexteamssdk?label=webexteamssdk + :target: https://pypistats.org/packages/webexteamssdk + :alt: webexteamssdk PyPI Downloads +.. image:: https://img.shields.io/github/actions/workflow/status/WebexCommunity/WebexPythonSDK/.github%2Fworkflows%2Fbuild-and-test.yml?label=tests + :target: https://github.com/WebexCommunity/WebexPythonSDK/actions/workflows/build-and-test.yml + :alt: Tests Status +.. image:: https://img.shields.io/github/actions/workflow/status/WebexCommunity/WebexPythonSDK/.github%2Fworkflows%2Fdocs.yml?label=docs + :target: https://webexcommunity.github.io/WebexPythonSDK/ + :alt: Documentation Status + --------------------------------------------------------------------------------------------------- @@ -111,7 +122,7 @@ Documentation ------------- **Excellent documentation is now available at:** -http://webexpythonsdk.readthedocs.io +https://webexcommunity.github.io/WebexPythonSDK Check out the Quickstart_ to dive in and begin using webexpythonsdk. @@ -180,20 +191,18 @@ this repository. .. _Community: https://eurl.io/#BJ0A8gfOQ .. _Contributing: https://github.com/WebexCommunity/WebexPythonSDK/blob/master/docs/contributing.rst .. _examples: https://github.com/WebexCommunity/WebexPythonSDK/tree/master/examples -.. _Introduction: http://webexpythonsdk.readthedocs.io/en/latest/user/intro.html +.. _Introduction: https://webexcommunity.github.io/WebexPythonSDK/user/intro.html .. _issues: https://github.com/WebexCommunity/WebexPythonSDK/issues -.. _migrate: https://webexpythonsdk.readthedocs.io/en/latest/user/migrate.html +.. _migrate: https://webexcommunity.github.io/WebexPythonSDK/user/migrate.html .. _pagination: https://developer.webex.com/docs/basics#pagination .. _projects: https://github.com/WebexCommunity/WebexPythonSDK/projects .. _pull request: https://github.com/WebexCommunity/WebexPythonSDK/pulls .. _pull requests: https://github.com/WebexCommunity/WebexPythonSDK/pulls -.. _Quickstart: http://webexpythonsdk.readthedocs.io/en/latest/user/quickstart.html +.. _Quickstart: https://webexcommunity.github.io/WebexPythonSDK/user/quickstart.html .. _Release Plan: https://github.com/WebexCommunity/WebexPythonSDK/wiki/Release-Plans .. _release/v0/ciscosparkapi: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v0/ciscosparkapi .. _release/v1/webexteamssdk: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v1/webexteamssdk .. _releases: https://github.com/WebexCommunity/WebexPythonSDK/releases .. _the repository: https://github.com/WebexCommunity/WebexPythonSDK .. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK -.. _webexpythonsdk: https://github.com/WebexCommunity/WebexPythonSDK -.. _webexpythonsdk.readthedocs.io: https://webexpythonsdk.readthedocs.io .. _webexteamssdk: https://github.com/WebexCommunity/WebexPythonSDK/tree/release/v1/webexteamssdk diff --git a/docs/conf.py b/docs/conf.py index c3b9a77..e2ced53 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -6,6 +6,7 @@ import webexpythonsdk +import sphinx_rtd_theme project = "webexpythonsdk" @@ -52,13 +53,9 @@ # a list of builtin themes. # # html_theme = 'alabaster' -on_rtd = os.environ.get("READTHEDOCS", None) == "True" -if not on_rtd: - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +html_theme = "sphinx_rtd_theme" +html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/docs/requirements.txt b/docs/requirements.txt new file mode 100644 index 0000000..52b04f2 --- /dev/null +++ b/docs/requirements.txt @@ -0,0 +1 @@ +sphinx_rtd_theme \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c097332..1d4e70a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ license = "MIT" readme = "README.rst" homepage = "https://github.com/WebexCommunity/WebexPythonSDK" repository = "https://github.com/WebexCommunity/WebexPythonSDK" -documentation = "https://webexpythonsdk.readthedocs.io" +documentation = "https://webexcommunity.github.io/WebexPythonSDK" include = ["LICENSE", "README.rst"] keywords = ["cisco", "webex", "api", "sdk", "python"] classifiers = [