Skip to content

Commit 97aa8e3

Browse files
committed
Update workflow to point the index to latest release.
1 parent dac233d commit 97aa8e3

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/docs.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,22 @@ jobs:
3434
- name: Build documentation
3535
run: sphinx-multiversion docs/source docs/build/html --keep-going --no-color
3636

37+
- name: Get the latest tag
38+
run: |
39+
# Fetch all tags
40+
git fetch --tags
41+
# Get the latest tag
42+
latest_tag=$(git tag --sort=-creatordate | head -n 1)
43+
# Remove the 'v' prefix if it exists
44+
latest_tag_no_v=${latest_tag#v}
45+
echo "LATEST_RELEASE=$latest_tag_no_v" >> $GITHUB_ENV
46+
3747
- name: Generate index.html for judge0.github.io/judge0-python.
3848
run: |
3949
echo '<!DOCTYPE html>
4050
<html>
4151
<head>
42-
<meta http-equiv="refresh" content="0; URL=master/index.html">
52+
<meta http-equiv="refresh" content="0; URL='$GITHUB_ENV/LATEST_RELEASE'/index.html">
4353
</head>
4454
</html>' > docs/build/html/index.html
4555

0 commit comments

Comments
 (0)