From 99a011d848b76faf0e6b76337bacc222424e41ee Mon Sep 17 00:00:00 2001 From: staticdev Date: Fri, 23 Jun 2023 10:09:05 +0200 Subject: [PATCH 1/2] Add docs upload workflow Signed-off-by: staticdev --- .github/workflows/docs.yml | 45 ++++++++++++++++++++++++++++++++++++++ .readthedocs.yml | 12 ++++++++++ tox.ini | 2 +- 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .readthedocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..86ced69e --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,45 @@ +--- +name: Check documentation + +"on": + schedule: + - cron: "0 1 * * *" # everyday at 1am + push: + paths: + - "**.rst" + - "docs/**" + pull_request: + paths: + - "**.rst" + - "docs/**" + +jobs: + docs: + name: Build documentation & check links + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Upgrade pip + run: | + pip install -U pip + pip --version + + - name: Install Tox + run: | + pip install tox + tox --version + + - name: Build documentation + run: tox + env: + TOXENV: docs + + - name: Upload documentation + uses: actions/upload-artifact@v3 + with: + name: docs + path: docs/_build diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..2fd28691 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,12 @@ +version: 2 +build: + os: ubuntu-22.04 + tools: + python: "3.11" +sphinx: + configuration: docs/source/conf.py +formats: all +python: + install: + - requirements: docs/source/requirements.txt + - path: . diff --git a/tox.ini b/tox.ini index 4654e0cc..6ba1da66 100644 --- a/tox.ini +++ b/tox.ini @@ -104,7 +104,7 @@ deps = build . commands = - sphinx-build -E -W -c docs/source/ -b html docs/source/ docs/build/html + sphinx-build -E -W -c docs/source/ -b html docs/source/ docs/_build/html python -mbuild -s twine check --strict dist/* From 06af862572e2f6d1c6507134d2a9fd763bc0888f Mon Sep 17 00:00:00 2001 From: Ian Stapleton Cordasco Date: Fri, 15 Dec 2023 07:00:38 -0600 Subject: [PATCH 2/2] Apply suggestions from code review No need to change build directory --- .github/workflows/docs.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 86ced69e..c8cb6ac2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,4 +42,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: docs - path: docs/_build + path: docs/build diff --git a/tox.ini b/tox.ini index 6ba1da66..4654e0cc 100644 --- a/tox.ini +++ b/tox.ini @@ -104,7 +104,7 @@ deps = build . commands = - sphinx-build -E -W -c docs/source/ -b html docs/source/ docs/_build/html + sphinx-build -E -W -c docs/source/ -b html docs/source/ docs/build/html python -mbuild -s twine check --strict dist/*