diff --git a/.github/workflows/multiversion-docs.yaml b/.github/workflows/multiversion-docs.yaml index 6f6d04ed3..0d6381371 100644 --- a/.github/workflows/multiversion-docs.yaml +++ b/.github/workflows/multiversion-docs.yaml @@ -7,6 +7,7 @@ on: push: branches: - main + - stable-legacy jobs: @@ -18,6 +19,7 @@ jobs: uses: actions/checkout@v3 with: path: repo + ref: main fetch-depth: 0 fetch-tags: true @@ -35,7 +37,7 @@ jobs: - name: Create local branches run: | cd ./repo - git branch main remotes/origin/main + git branch stable-legacy remotes/origin/stable-legacy - name: Make the Sphinx docs run: | diff --git a/docsrc/poly.py b/docsrc/poly.py index d7156bf73..0acfc8d45 100644 --- a/docsrc/poly.py +++ b/docsrc/poly.py @@ -17,12 +17,11 @@ root = Git.root(Path(__file__).parent) #: CodeRegex matching the branches to build docs for -# BRANCH_REGEX = r"^(main|dev)$" -BRANCH_REGEX = r"^(dev)$" +BRANCH_REGEX = r"^(main|stable-legacy)$" #: Regex matching the tags to build docs for -TAG_REGEX = r"^v(1\.1\.6|(?!1\.)[\.0-9]*)$" -# TAG_REGEX = r"" +# TAG_REGEX = r"^v((?!1\.)[\.0-9]*)$" +TAG_REGEX = r"" #: Output dir relative to project root OUTPUT_DIR = "_build_polyversion" @@ -121,8 +120,8 @@ def root_data(driver): async def selector(rev, keys): """Select configuration based on revision""" # map all v1 revisions to one configuration - if rev.name.startswith("v1."): - return "v1.1.6" + if rev.name.startswith("v1.") or rev.name == "stable-legacy": + return "stable-legacy" elif rev.name == "local": return "local" # common config for everything else @@ -138,7 +137,7 @@ async def selector(rev, keys): env={"KERAS_BACKEND": "jax"}, ), # configuration for v1 - "v1.1.6": DynamicPip.factory( + "stable-legacy": DynamicPip.factory( **shared_env_kwargs, args=["-e", "."] + SPHINX_DEPS + V1_BACKEND_DEPS, env={"SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BAYESFLOW": "1.1.6"},