From 18b62806e22d99c1e556e21c573781e0487c64f1 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 01762b15ad1..9f25770ad3b 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -571,11 +571,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 6da6f3f5e730b639bff025f59d70f6e2eefad38c 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 9f25770ad3b..974dbd3f586 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -574,14 +574,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