Skip to content

Commit 9c8ad4b

Browse files
authored
Merge pull request #15061 from nextcloud/backport/15049/stable32
[stable32] fix: skip deploy PR when only lastupdated timestamps or epub/pdf changed
2 parents de84bc3 + 92310c1 commit 9c8ad4b

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

.github/workflows/sphinxbuild.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,11 +571,17 @@ jobs:
571571
# Cleanup empty directories
572572
find . -type d -empty -delete
573573
574-
# Check if there are actual changes
575-
if git diff --quiet HEAD; then
576-
echo "has_changes=false" >> $GITHUB_OUTPUT
577-
else
574+
# Check for meaningful changes, ignoring:
575+
# - lastupdated date lines in HTML (Sphinx build-time timestamps)
576+
# - epub/pdf binaries (they regenerate automatically alongside HTML)
577+
meaningful_html=$(git diff HEAD -- '*.html' | grep -E '^[+-]' | grep -v '^[+-]{3}' | grep -ivE 'lastupdated|Last updated on' | wc -l)
578+
other_changes=$(git diff --name-only HEAD | grep -cvE '\.(html|epub|pdf)$' || true)
579+
580+
if [ "$meaningful_html" -gt 0 ] || [ "$other_changes" -gt 0 ]; then
578581
echo "has_changes=true" >> $GITHUB_OUTPUT
582+
else
583+
echo "has_changes=false" >> $GITHUB_OUTPUT
584+
echo "::notice::Skipping deploy PR: only lastupdated timestamps or epub/pdf binaries changed"
579585
fi
580586
581587
- name: Strip noindex from stable docs

0 commit comments

Comments
 (0)