From 17d07d6565262044e5ae7ac4b0bf64aca3c4be84 Mon Sep 17 00:00:00 2001 From: rafa-be Date: Mon, 7 Oct 2024 16:52:45 +0200 Subject: [PATCH] Adds a GitHub Action that publishes the Parfun docs. Signed-off-by: rafa-be --- .github/workflows/documentation.yml | 41 +++++++++++++++++++ Makefile | 20 --------- ...requirements_docs.txt => requirements.txt} | 2 +- docs/source/conf.py | 1 - parfun/about.py | 2 +- 5 files changed, 43 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/documentation.yml delete mode 100644 Makefile rename docs/{requirements_docs.txt => requirements.txt} (81%) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..5e20e74 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,41 @@ +name: Publish documentation to GitHub Pages + +on: + release: + types: [created] + +permissions: + contents: read + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python 3.8 + uses: actions/setup-python@v5 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r docs/requirements.txt + + - name: Build documentation + run: cd docs && make html + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: './docs/build/html' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/Makefile b/Makefile deleted file mode 100644 index 9313944..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -.PHONY: doc - -all: doc - -# declare your targets here & implement them with '_' prefix -doc: -# target name is formatted: -# bold - \033[1m, purple - \033[095m, normal text - \033[0m - @echo -e "Executing \033[1m\033[095m$@\033[0m target:" - @$(MAKE) --no-print-directory _$@ - @echo - -_doc: requirements.txt - rm -fr docsvenv build; mkdir build - python3.8 -m venv docsvenv - . docsvenv/bin/activate; \ - pip install -r docs/requirements_docs.txt; \ - pip install -r requirements.txt; \ - cd docs; make clean && make html - zip -r build/parfun_docs.zip docs/build/html/* diff --git a/docs/requirements_docs.txt b/docs/requirements.txt similarity index 81% rename from docs/requirements_docs.txt rename to docs/requirements.txt index 8a9310f..5fc63fc 100644 --- a/docs/requirements_docs.txt +++ b/docs/requirements.txt @@ -1,6 +1,6 @@ sphinx -sphinx-jsonschema sphinx_rtd_theme sphinx-substitution-extensions dask[distributed] pandas +scaler diff --git a/docs/source/conf.py b/docs/source/conf.py index c95f2d9..78bea0e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -40,7 +40,6 @@ "sphinx.ext.doctest", "sphinx_substitution_extensions", "sphinx.ext.napoleon", - "sphinx-jsonschema", ] # Add any paths that contain templates here, relative to this directory. diff --git a/parfun/about.py b/parfun/about.py index b2ea6c2..e32e0f2 100644 --- a/parfun/about.py +++ b/parfun/about.py @@ -1 +1 @@ -__version__ = "7.0.2" +__version__ = "7.0.3"