Skip to content

Commit d197fad

Browse files
committed
Symlink stable version to version based on master
1 parent 07af432 commit d197fad

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.github/actions/push-to-repo/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set -o errexit
33
set -o pipefail
44
set -o nounset
55

6+
67
readonly ssh_dir="/root/.ssh"
78
mkdir -p "${ssh_dir}"
89

.github/workflows/continuous-testing.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,17 @@ jobs:
9797
runs-on: ubuntu-20.04
9898
steps:
9999
- uses: actions/checkout@v2
100+
with: {fetch-depth: 0}
100101
- uses: mamba-org/provision-with-micromamba@v10
101102
with: { environment-file: dev/conda.yaml }
102103
- name: "Build documentation."
103104
shell: bash -l {0}
104105
run: bash dev/run.sh --fix-pythonpath --build-doc-dir=local/docs/latest configure -- build-doc
106+
- name: "Symlink stable documentation."
107+
run: |
108+
version="$(bash dev/run.sh git-version origin/master | grep -E -o '[0-9]+\.[0-9]+')" &&
109+
cd local/docs/ &&
110+
ln -sf "${version:?}" "stable"
105111
- uses: ./.github/actions/push-to-repo
106112
with:
107113
git_email: "BotEcole@users.noreply.github.com"
@@ -137,13 +143,6 @@ jobs:
137143
run: |
138144
version="$(echo "${GITHUB_REF#refs/tags/v}" | grep -E -o '[0-9]+\.[0-9]+')" &&
139145
bash dev/run.sh --fix-pythonpath --build-doc-dir="local/docs/${version}" configure -- build-doc
140-
- name: "Symlink stable dnocumentation."
141-
run: > # Only symlink on non pre/dev/post releases
142-
if echo "${GITHUB_REF#refs/tags/}" | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$'; then
143-
version="$(echo "${GITHUB_REF#refs/tags/}" | grep -E -o '[0-9]+\.[0-9]+')"
144-
cd local/docs/
145-
ln -s "${version}" "stable"
146-
fi
147146
- uses: ./.github/actions/push-to-repo
148147
with:
149148
git_email: "BotEcole@users.noreply.github.com"

0 commit comments

Comments
 (0)