From af7648d0af22cacbe2cf37208c0ea7510851cc94 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 06:12:25 +0000 Subject: [PATCH 1/2] fix: skip deploy PR when only lastupdated timestamps or epub/pdf changed When Sphinx rebuilds documentation without any content changes, it still updates the `` date in every HTML file and regenerates epub/pdf binaries. This caused a noisy automated PR (e.g. #15046) with no meaningful content change. The `has_changes` check in the deploy job now ignores: - HTML lines matching `lastupdated` or `Last updated on` - epub and pdf binary files (which regenerate alongside HTML) If all changes fall into those categories, no PR is created. --- .github/workflows/sphinxbuild.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index a1bc6b76dec..59a3d245070 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -577,11 +577,17 @@ jobs: # Cleanup empty directories find . -type d -empty -delete - # Check if there are actual changes - if git diff --quiet HEAD; then - echo "has_changes=false" >> $GITHUB_OUTPUT - else + # Check for meaningful changes, ignoring: + # - lastupdated date lines in HTML (Sphinx build-time timestamps) + # - epub/pdf binaries (they regenerate automatically alongside HTML) + meaningful_html=$(git diff HEAD -- '*.html' | grep -E '^[+-]' | grep -v '^[+-]{3}' | grep -v 'lastupdated\|Last updated on' | wc -l) + other_changes=$(git diff --name-only HEAD | grep -cvE '\.(html|epub|pdf)$' || true) + + if [ "$meaningful_html" -gt 0 ] || [ "$other_changes" -gt 0 ]; then echo "has_changes=true" >> $GITHUB_OUTPUT + else + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "Skipping PR: only lastupdated timestamps or epub/pdf binaries changed" fi - name: Strip noindex from stable docs From c5f22323fc9581d41f9e02f4894d8f9a4b79cf17 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 06:13:06 +0000 Subject: [PATCH 2/2] fix: use case-insensitive grep and GH Actions notice for lastupdated skip --- .github/workflows/sphinxbuild.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index 59a3d245070..d4e9b52c6e9 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -580,14 +580,14 @@ jobs: # Check for meaningful changes, ignoring: # - lastupdated date lines in HTML (Sphinx build-time timestamps) # - epub/pdf binaries (they regenerate automatically alongside HTML) - meaningful_html=$(git diff HEAD -- '*.html' | grep -E '^[+-]' | grep -v '^[+-]{3}' | grep -v 'lastupdated\|Last updated on' | wc -l) + meaningful_html=$(git diff HEAD -- '*.html' | grep -E '^[+-]' | grep -v '^[+-]{3}' | grep -ivE 'lastupdated|Last updated on' | wc -l) other_changes=$(git diff --name-only HEAD | grep -cvE '\.(html|epub|pdf)$' || true) if [ "$meaningful_html" -gt 0 ] || [ "$other_changes" -gt 0 ]; then echo "has_changes=true" >> $GITHUB_OUTPUT else echo "has_changes=false" >> $GITHUB_OUTPUT - echo "Skipping PR: only lastupdated timestamps or epub/pdf binaries changed" + echo "::notice::Skipping deploy PR: only lastupdated timestamps or epub/pdf binaries changed" fi - name: Strip noindex from stable docs