From 90e5ea3a16fb676096daef1f48e320c59dac3992 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Karlo=20Do=C5=A1ilovi=C4=87?= Date: Fri, 28 Nov 2025 18:14:05 +0100 Subject: [PATCH 1/2] Fetch only release tag versions (without prereleases). --- .github/workflows/docs.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 182c3f95..103f4a5a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,8 +17,12 @@ jobs: fetch-depth: 0 # Fetch the full history ref: ${{ github.ref }} # Check out the current branch or tag - - name: Fetch tags only - run: git fetch --tags --no-recurse-submodules + - name: Fetch version tags only (vx.y.z) + run: | + 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]+$') + for tag in $TAGS; do + git fetch origin "refs/tags/$tag:refs/tags/$tag" --no-recurse-submodules + done - name: Set up Python uses: actions/setup-python@v4 From afb1aa3e3405f0cd7f4c21cb37052440ccb38e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filip=20Karlo=20Do=C5=A1ilovi=C4=87?= Date: Fri, 28 Nov 2025 18:23:43 +0100 Subject: [PATCH 2/2] Update. --- .github/workflows/docs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 103f4a5a..de80d4e6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -37,12 +37,12 @@ jobs: - name: Build documentation run: uv run sphinx-multiversion docs/source docs/build/html --keep-going --no-color - - name: Get the latest tag + - name: Get the latest stable tag run: | # Fetch all tags git fetch --tags - # Get the latest tag - latest_tag=$(git tag --sort=-creatordate | head -n 1) + # Get the latest stable tag + latest_tag=$(git tag --sort=-creatordate | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1) echo "LATEST_RELEASE=$latest_tag" >> $GITHUB_ENV - name: Generate index.html for judge0.github.io/judge0-python.