Skip to content

Commit f59f64c

Browse files
committed
Avoid redeploys when only sitemap.xml and search-index.js have changed
1 parent cb67936 commit f59f64c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,11 @@ jobs:
7171
docs-repo
7272
cd docs-repo
7373
git status
74-
git_changes=$(if [[ -n "$(git status --porcelain)" ]]; then echo '1'; else echo '0'; fi)
74+
git_changes=$(git status --porcelain | grep --invert-match --regexp=' sitemap.xml$' --regexp=' search-index.js$' | wc -l)
75+
echo "Detected $git_changes change(s)"
7576
echo "git_changes=$git_changes" >> "$GITHUB_OUTPUT"
7677
- name: Push to docs.junit.org repo
77-
if: env.DEPLOY == 'true' && steps.antora_copy.outputs.git_changes == '1'
78+
if: env.DEPLOY == 'true' && steps.antora_copy.outputs.git_changes > 0
7879
working-directory: docs-repo
7980
run: |
8081
git config --global user.name "JUnit Team"

0 commit comments

Comments
 (0)