Skip to content

Commit f9b2e61

Browse files
committed
Merge branch 'master' of github.com:judge0/judge0-py
2 parents 38b13f9 + 0847529 commit f9b2e61

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/docs.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ jobs:
1717
fetch-depth: 0 # Fetch the full history
1818
ref: ${{ github.ref }} # Check out the current branch or tag
1919

20-
- name: Fetch tags only
21-
run: git fetch --tags --no-recurse-submodules
20+
- name: Fetch version tags only (vx.y.z)
21+
run: |
22+
TAGS=$(git ls-remote --tags origin 'v*[0-9].[0-9].[0-9]' | sed 's/.*refs\/tags\///' | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$')
23+
for tag in $TAGS; do
24+
git fetch origin "refs/tags/$tag:refs/tags/$tag" --no-recurse-submodules
25+
done
2226
2327
- name: Set up Python
2428
uses: actions/setup-python@v4
@@ -33,12 +37,12 @@ jobs:
3337
- name: Build documentation
3438
run: uv run sphinx-multiversion docs/source docs/build/html --keep-going --no-color
3539

36-
- name: Get the latest tag
40+
- name: Get the latest stable tag
3741
run: |
3842
# Fetch all tags
3943
git fetch --tags
40-
# Get the latest tag
41-
latest_tag=$(git tag --sort=-creatordate | head -n 1)
44+
# Get the latest stable tag
45+
latest_tag=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1)
4246
echo "LATEST_RELEASE=$latest_tag" >> $GITHUB_ENV
4347
4448
- name: Generate index.html for judge0.github.io/judge0-python.

0 commit comments

Comments
 (0)