File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,20 @@ jobs:
21
21
run : |
22
22
for dir in */; do
23
23
if [ -z "$(git log -n 1 --since "1 month ago" -- "$dir")" ]; then
24
- git rm -r "$dir"
24
+ echo "Removing stale directory: $dir"
25
+ git rm --quiet -r "$dir"
25
26
fi
26
27
done
27
- git status
28
- - name : Commit
28
+ - name : Configure git user
29
29
run : |
30
30
git config user.name 'github-actions[bot]'
31
31
git config user.email 'github-actions[bot]@users.noreply.github.com'
32
- git commit -m 'chore: remove stale GitHub Pages branches'
32
+ - name : Commit
33
+ run : |
34
+ if diff --staged --quiet; then
35
+ echo 'No stale directories were found. Nothing to commit.'
36
+ else
37
+ git commit -m 'chore: remove stale GitHub Pages branches'
38
+ fi
33
39
- name : Push
34
40
run : " git push"
You can’t perform that action at this time.
0 commit comments