From d742f34c3339df2d58b51e8b2359449806e0ad2f Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Thu, 29 Oct 2026 19:02:19 +0530 Subject: [PATCH 01/16] Add Python docs version switcher --- python/doc/source/conf.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/python/doc/source/conf.py b/python/doc/source/conf.py index 4a80c3dd6..0f13f580b 100644 --- a/python/doc/source/conf.py +++ b/python/doc/source/conf.py @@ -142,16 +142,17 @@ def setup(app): html_theme = "pydata_sphinx_theme" -# FIXME: Implement a version switch like NumPy. -# Set up the version switcher. The versions.json is stored in the doc repo. -# if os.environ.get('CIRCLE_JOB', False) and \ -# os.environ.get('CIRCLE_BRANCH', '') != 'main': -# # For PR, name is set to its ref -# switcher_version = os.environ['CIRCLE_BRANCH'] -# elif ".9999" in version: -# switcher_version = "devdocs" -# else: -# switcher_version = f"{version}" +# Use the version switcher metadata maintained in the gh-pages branch. +# Pull request builds use the PR ref so preview pages are not labelled as a +# released version. +if os.environ.get("GITHUB_ACTIONS") and os.environ.get("GITHUB_HEAD_REF"): + switcher_version = os.environ["GITHUB_HEAD_REF"] +elif ".dev" in version: + switcher_version = "dev" +else: + switcher_version = version + +switcher_json_url = f"{html_site_root}versions.json" html_theme_options = { "collapse_navigation": True, @@ -169,8 +170,7 @@ def setup(app): }, "navbar_align": "content", # Add light/dark mode and documentation version switcher: - # "navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"], - "navbar_end": ["theme-switcher", "navbar-icon-links"], + "navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"], "navbar_start": ["navbar-logo"], "navigation_with_keys": False, # https://sphinx-gallery.github.io/stable/advanced.html#using-sphinx-gallery-sidebar-components @@ -180,6 +180,10 @@ def setup(app): "sg_launcher_links", ], "show_prev_next": True, + "switcher": { + "json_url": switcher_json_url, + "version_match": switcher_version, + }, "show_toc_level": 2, # On this page sidebar "sidebar_includehidden": True, "use_edit_page_button": True, From 705e0968e79844abf72fa1d0724e69b57aae72e4 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Thu, 29 Oct 2026 19:02:53 +0530 Subject: [PATCH 02/16] Enable Python docs version switcher From 09567b984f7f645b4e079f907f114906b99260d3 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Mon, 16 Nov 2026 21:45:17 +0530 Subject: [PATCH 03/16] ci(docs): deploy versioned python docs and update versions.json Updated deployment logic for documentation and added version handling. --- .github/workflows/python.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d3dcd1e81..1465770bd 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -147,9 +147,8 @@ jobs: restore-keys: intersphinx- - name: Build the docs 🔧 - env: - DEST: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || 'main' }} run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then DEST="pr-${{ github.event.pull_request.number }}"; elif [ "${{ github.event_name }}" = "release" ]; then DEST="${GITHUB_REF_NAME#v}"; else DEST="dev"; fi make -C doc html mkdir ../staging mv doc/_build/html "../staging/$DEST" @@ -165,7 +164,7 @@ jobs: deploy-docs: name: Deploy docs needs: build-doc - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'release' && github.event.action == 'published') runs-on: ubuntu-latest permissions: contents: write @@ -182,15 +181,25 @@ jobs: with: name: docs-python path: artifact - + - name: Prepare versions.json + id: ver + run: | + if [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi; echo "version=$VERSION" >> "$GITHUB_OUTPUT"; git fetch origin gh-pages || true; mkdir -p versions_meta; git show origin/gh-pages:python/versions.json > versions_meta/existing.json 2>/dev/null || echo '[]' > versions_meta/existing.json; VERSION="$VERSION" python3 -c 'import json, os; v = os.environ["VERSION"]; b = "https" + "://multi-objective.github.io/moocore/python/"; d = json.load(open("versions_meta/existing.json")); e = {"name": "dev", "version": "dev", "url": b + "dev/"} if v == "dev" else {"version": v, "url": b + v + "/", "preferred": True}; [x.pop("preferred", None) for x in d if v != "dev" and isinstance(x, dict)]; d = [x for x in d if not (isinstance(x, dict) and x.get("version") == v)] + [e]; json.dump(d, open("versions_meta/versions.json", "w"), indent=2)'; rm -f versions_meta/existing.json - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: - folder: artifact/main - target-folder: python + folder: artifact/${{ steps.ver.outputs.version }} + target-folder: python/${{ steps.ver.outputs.version }} single-commit: true clean: true - + - name: Deploy versions.json + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: versions_meta + target-folder: python + single-commit: true + clean: false + coverage: timeout-minutes: 15 needs: build-doc From 302588f427189049fc66f3ab1d1c3c61afd76626 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:45:43 +0530 Subject: [PATCH 04/16] ci(docs): extract versions.json updater into python/doc/update_versions.py This script loads existing versions from a JSON file in a Git repository, updates the version list with a new version entry, and saves the updated list to a local JSON file. --- python/doc/update_versions.py | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 python/doc/update_versions.py diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py new file mode 100644 index 000000000..5d7ab6279 --- /dev/null +++ b/python/doc/update_versions.py @@ -0,0 +1,57 @@ +import json +import os +import subprocess +import sys +from pathlib import Path + +BASE = "https" + "://multi-objective.github.io/moocore/python/" + + +def load_existing_versions() -> list[dict]: + result = subprocess.run( + ["git", "show", "origin/gh-pages:python/versions.json"], + capture_output=True, + text=True, + check=False, + ) + if result.returncode != 0 or not result.stdout.strip(): + return [] + data = json.loads(result.stdout) + return data if isinstance(data, list) else [] + + +def update_versions(version: str) -> None: + data = load_existing_versions() + if version == "dev": + entry = {"name": "dev", "version": "dev", "url": BASE + "dev/"} + else: + entry = { + "version": version, + "url": f"{BASE}{version}/", + "preferred": True, + } + for item in data: + if isinstance(item, dict): + item.pop("preferred", None) + + updated = [ + item + for item in data + if not (isinstance(item, dict) and item.get("version") == version) + ] + updated.append(entry) + + out_dir = Path("versions_meta") + out_dir.mkdir(parents=True, exist_ok=True) + with (out_dir / "versions.json").open("w", encoding="utf-8") as f: + json.dump(updated, f, indent=2) + f.write("\n") + + +def main() -> None: + version = sys.argv[1] if len(sys.argv) > 1 else os.environ["VERSION"] + update_versions(version) + + +if __name__ == "__main__": + main() From df2ac46435e53d085c00f91b3107d611da99c1ec Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:48:31 +0530 Subject: [PATCH 05/16] ci(docs): invoke python/doc/update_versions.py from python.yml --- .github/workflows/python.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 1465770bd..a6aa3eb45 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -184,7 +184,10 @@ jobs: - name: Prepare versions.json id: ver run: | - if [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi; echo "version=$VERSION" >> "$GITHUB_OUTPUT"; git fetch origin gh-pages || true; mkdir -p versions_meta; git show origin/gh-pages:python/versions.json > versions_meta/existing.json 2>/dev/null || echo '[]' > versions_meta/existing.json; VERSION="$VERSION" python3 -c 'import json, os; v = os.environ["VERSION"]; b = "https" + "://multi-objective.github.io/moocore/python/"; d = json.load(open("versions_meta/existing.json")); e = {"name": "dev", "version": "dev", "url": b + "dev/"} if v == "dev" else {"version": v, "url": b + v + "/", "preferred": True}; [x.pop("preferred", None) for x in d if v != "dev" and isinstance(x, dict)]; d = [x for x in d if not (isinstance(x, dict) and x.get("version") == v)] + [e]; json.dump(d, open("versions_meta/versions.json", "w"), indent=2)'; rm -f versions_meta/existing.json + f [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + git fetch origin gh-pages || true + VERSION="$VERSION" python3 python/doc/update_versions.py - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: From b60343ae835d9c44902f2ebe27b5c16865b68478 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:58:38 +0530 Subject: [PATCH 06/16] ci(docs): fix YAML indentation and trailing whitespace in python.yml --- .github/workflows/python.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index a6aa3eb45..392b26487 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -197,12 +197,12 @@ jobs: clean: true - name: Deploy versions.json uses: JamesIves/github-pages-deploy-action@v4 - with: + with: folder: versions_meta target-folder: python single-commit: true clean: false - + coverage: timeout-minutes: 15 needs: build-doc From 3f34133b42705bea8a069d993be2ba9ac59a9a85 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 10:03:22 +0530 Subject: [PATCH 07/16] docs: add module docstring to update_versions.py Add docstring for version update script --- python/doc/update_versions.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py index 5d7ab6279..0b30e5f2f 100644 --- a/python/doc/update_versions.py +++ b/python/doc/update_versions.py @@ -1,3 +1,5 @@ +"""Update versions.json for PyData Sphinx Theme version switcher."" + import json import os import subprocess From de3696ef993d2791f3f36ecba7e823a496243995 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 10:04:59 +0530 Subject: [PATCH 08/16] docs: add module docstring to update_versions.py --- python/doc/update_versions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py index 0b30e5f2f..5a036a0fd 100644 --- a/python/doc/update_versions.py +++ b/python/doc/update_versions.py @@ -1,4 +1,4 @@ -"""Update versions.json for PyData Sphinx Theme version switcher."" +"""Update versions.json for PyData Sphinx Theme version switcher.""" import json import os From 6e8a4b3e8e55a9b11a4aac20867aba43c674c26b Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Tue, 17 Nov 2026 10:12:27 +0530 Subject: [PATCH 09/16] docs: add function docstrings in update_versions.py Added docstrings to functions for better documentation. --- python/doc/update_versions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py index 5a036a0fd..ca4090593 100644 --- a/python/doc/update_versions.py +++ b/python/doc/update_versions.py @@ -10,6 +10,7 @@ def load_existing_versions() -> list[dict]: + """Load existing version entries from gh-pages.""" result = subprocess.run( ["git", "show", "origin/gh-pages:python/versions.json"], capture_output=True, @@ -23,6 +24,7 @@ def load_existing_versions() -> list[dict]: def update_versions(version: str) -> None: + """Update versions.json with the given documentation version.""" data = load_existing_versions() if version == "dev": entry = {"name": "dev", "version": "dev", "url": BASE + "dev/"} @@ -51,6 +53,7 @@ def update_versions(version: str) -> None: def main() -> None: + """Parse the target version and update versions.json.""" version = sys.argv[1] if len(sys.argv) > 1 else os.environ["VERSION"] update_versions(version) From 1a98527015dff0fe2a1160bb50ace078b5d9695e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez?= <2620021+MLopez-Ibanez@users.noreply.github.com> Date: Tue, 17 Nov 2026 18:36:32 +0000 Subject: [PATCH 10/16] Fix syntax error in version preparation step Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 392b26487..9d4acbb75 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -184,7 +184,7 @@ jobs: - name: Prepare versions.json id: ver run: | - f [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi + if [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi echo "version=$VERSION" >> "$GITHUB_OUTPUT" git fetch origin gh-pages || true VERSION="$VERSION" python3 python/doc/update_versions.py From 0b31c291cd6918e0941b99f4366d49610df8d9bb Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Wed, 18 Nov 2026 20:59:27 +0530 Subject: [PATCH 11/16] Add site.json for HTML site root configuration --- python/doc/site.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 python/doc/site.json diff --git a/python/doc/site.json b/python/doc/site.json new file mode 100644 index 000000000..c15c7d3d5 --- /dev/null +++ b/python/doc/site.json @@ -0,0 +1,3 @@ +{ + "html_site_root": "https://multi-objective.github.io/moocore/python/" +} From 98c628bc5f14fb9896a55a6f3c63be5d2eae2f92 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Wed, 18 Nov 2026 21:00:26 +0530 Subject: [PATCH 12/16] Enhance version update functionality in update_versions.py Refactor update_versions.py to improve version handling and add argument parsing. --- python/doc/update_versions.py | 71 ++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py index ca4090593..d26f836f2 100644 --- a/python/doc/update_versions.py +++ b/python/doc/update_versions.py @@ -1,11 +1,78 @@ """Update versions.json for PyData Sphinx Theme version switcher.""" +import argparse import json -import os import subprocess -import sys from pathlib import Path +SITE_CONFIG = json.loads( + (Path(__file__).resolve().parent / "site.json").read_text(encoding="utf-8") +) +BASE = SITE_CONFIG["html_site_root"] + + +def load_existing_versions() -> list[dict]: + """Load existing version entries from gh-pages.""" + subprocess.run(["git", "fetch", "origin", "gh-pages"], check=True) + result = subprocess.run( + ["git", "show", "origin/gh-pages:python/versions.json"], + capture_output=True, + text=True, + check=False, + ) + if result.returncode != 0 or not result.stdout.strip(): + return [] + data = json.loads(result.stdout) + return data if isinstance(data, list) else [] + + +def update_versions(version: str) -> None: + """Update versions.json with the given documentation version.""" + base = BASE + data = load_existing_versions() + if version == "dev": + entry = {"name": "dev", "version": "dev", "url": base + "dev/"} + else: + entry = { + "name": f"{version} (stable)", + "version": version, + "url": f"{base}stable/", + "preferred": True, + } + for item in data: + if isinstance(item, dict): + item.pop("preferred", None) + if item.get("url") == f"{base}stable/" and item.get("version"): + item["name"] = item["version"] + item["url"] = f"{base}{item['version']}/" + + updated = [ + item + for item in data + if not (isinstance(item, dict) and item.get("version") == version) + ] + updated.append(entry) + + out_dir = Path("versions_meta") + out_dir.mkdir(parents=True, exist_ok=True) + with (out_dir / "versions.json").open("w", encoding="utf-8") as f: + json.dump(updated, f, indent=2) + f.write("\n") + + +def main() -> None: + """Parse the target version and update versions.json.""" + parser = argparse.ArgumentParser( + description="Update versions.json for PyData Sphinx Theme version switcher." + ) + parser.add_argument("version", help="Documentation version to add or update.") + args = parser.parse_args() + update_versions(args.version) + + +if __name__ == "__main__": + main() + BASE = "https" + "://multi-objective.github.io/moocore/python/" From b7c60fea1b954606f816e5e5d7496cb2769f36a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:30:58 +0000 Subject: [PATCH 13/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- python/doc/update_versions.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/doc/update_versions.py b/python/doc/update_versions.py index d26f836f2..2ad77812d 100644 --- a/python/doc/update_versions.py +++ b/python/doc/update_versions.py @@ -65,7 +65,9 @@ def main() -> None: parser = argparse.ArgumentParser( description="Update versions.json for PyData Sphinx Theme version switcher." ) - parser.add_argument("version", help="Documentation version to add or update.") + parser.add_argument( + "version", help="Documentation version to add or update." + ) args = parser.parse_args() update_versions(args.version) From eb8ca7d6a459537674e5c6553248614e77c526dc Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Wed, 18 Nov 2026 21:02:58 +0530 Subject: [PATCH 14/16] Load site configuration from site.json --- python/doc/source/conf.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/python/doc/source/conf.py b/python/doc/source/conf.py index 6a89bef18..798cfec55 100644 --- a/python/doc/source/conf.py +++ b/python/doc/source/conf.py @@ -9,8 +9,10 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information import os +import json import sys from datetime import date +from pathlib import Path import sphinx @@ -34,7 +36,12 @@ # Can we get this from pyproject.toml ? author = "Manuel López-Ibáñez and Fergus Rooney" copyright = f"2024-{year}, {author}" -html_site_root = f"https://multi-objective.github.io/{project}/python/" +_site_config = json.loads( + (Path(__file__).resolve().parent.parent / "site.json").read_text( + encoding="utf-8" + ) +) +html_site_root = _site_config["html_site_root"] github_url = f"https://github.com/multi-objective/{project}" # -- General configuration --------------------------------------------------- @@ -156,6 +163,7 @@ def setup(app): html_theme_options = { "collapse_navigation": True, + "show_version_warning_banner": True, "github_url": github_url, "header_links_before_dropdown": 5, "icon_links": [ From 75bd66822a0b14c1721c61580e54e6a787327b6f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:33:29 +0000 Subject: [PATCH 15/16] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- python/doc/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/doc/source/conf.py b/python/doc/source/conf.py index 798cfec55..ec88c2b6d 100644 --- a/python/doc/source/conf.py +++ b/python/doc/source/conf.py @@ -8,8 +8,8 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -import os import json +import os import sys from datetime import date from pathlib import Path From 0de6e3548e73f0f151faeaaeb99b2d19d4d90f49 Mon Sep 17 00:00:00 2001 From: Vamsi-2581 <245859299+Vamsi-2581@users.noreply.github.com> Date: Wed, 18 Nov 2026 21:06:37 +0530 Subject: [PATCH 16/16] Update environment variable handling in python.yml Refactor environment variable assignments for DEST and VERSION in the GitHub Actions workflow. --- .github/workflows/python.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 9d4acbb75..f4a58221b 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -147,8 +147,10 @@ jobs: restore-keys: intersphinx- - name: Build the docs 🔧 + env: + DEST: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || github.event_name == 'release' && github.ref_name || 'dev' }} run: | - if [ "${{ github.event_name }}" = "pull_request" ]; then DEST="pr-${{ github.event.pull_request.number }}"; elif [ "${{ github.event_name }}" = "release" ]; then DEST="${GITHUB_REF_NAME#v}"; else DEST="dev"; fi + DEST="${DEST#v}" make -C doc html mkdir ../staging mv doc/_build/html "../staging/$DEST" @@ -183,11 +185,16 @@ jobs: path: artifact - name: Prepare versions.json id: ver + env: + VERSION: ${{ github.event_name == 'release' && github.ref_name || 'dev' }} run: | - if [ "${{ github.event_name }}" = "release" ]; then VERSION="${GITHUB_REF_NAME#v}"; else VERSION="dev"; fi + VERSION="${VERSION#v}" echo "version=$VERSION" >> "$GITHUB_OUTPUT" - git fetch origin gh-pages || true - VERSION="$VERSION" python3 python/doc/update_versions.py + python3 python/doc/update_versions.py "$VERSION" + if [ "${{ github.event_name }}" = "release" ]; then + ln -sfn "$VERSION" versions_meta/stable + fi + - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4 with: