Skip to content

Commit 4887bfc

Browse files
authored
[no ci] docs: select branches main and stable-legacy (#361)
1 parent 09c2d1d commit 4887bfc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

.github/workflows/multiversion-docs.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
push:
88
branches:
99
- main
10+
- stable-legacy
1011

1112
jobs:
1213

@@ -18,6 +19,7 @@ jobs:
1819
uses: actions/checkout@v3
1920
with:
2021
path: repo
22+
ref: main
2123
fetch-depth: 0
2224
fetch-tags: true
2325

@@ -35,7 +37,7 @@ jobs:
3537
- name: Create local branches
3638
run: |
3739
cd ./repo
38-
git branch main remotes/origin/main
40+
git branch stable-legacy remotes/origin/stable-legacy
3941
4042
- name: Make the Sphinx docs
4143
run: |

docsrc/poly.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@
1717
root = Git.root(Path(__file__).parent)
1818

1919
#: CodeRegex matching the branches to build docs for
20-
# BRANCH_REGEX = r"^(main|dev)$"
21-
BRANCH_REGEX = r"^(dev)$"
20+
BRANCH_REGEX = r"^(main|stable-legacy)$"
2221

2322
#: Regex matching the tags to build docs for
24-
TAG_REGEX = r"^v(1\.1\.6|(?!1\.)[\.0-9]*)$"
25-
# TAG_REGEX = r""
23+
# TAG_REGEX = r"^v((?!1\.)[\.0-9]*)$"
24+
TAG_REGEX = r""
2625

2726
#: Output dir relative to project root
2827
OUTPUT_DIR = "_build_polyversion"
@@ -121,8 +120,8 @@ def root_data(driver):
121120
async def selector(rev, keys):
122121
"""Select configuration based on revision"""
123122
# map all v1 revisions to one configuration
124-
if rev.name.startswith("v1."):
125-
return "v1.1.6"
123+
if rev.name.startswith("v1.") or rev.name == "stable-legacy":
124+
return "stable-legacy"
126125
elif rev.name == "local":
127126
return "local"
128127
# common config for everything else
@@ -138,7 +137,7 @@ async def selector(rev, keys):
138137
env={"KERAS_BACKEND": "jax"},
139138
),
140139
# configuration for v1
141-
"v1.1.6": DynamicPip.factory(
140+
"stable-legacy": DynamicPip.factory(
142141
**shared_env_kwargs,
143142
args=["-e", "."] + SPHINX_DEPS + V1_BACKEND_DEPS,
144143
env={"SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BAYESFLOW": "1.1.6"},

0 commit comments

Comments
 (0)