fix fail from no changes

This commit is contained in:
Satr14 2025-03-22 09:35:11 +00:00 committed by GitHub
commit 2c957fd82a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,14 +26,19 @@ jobs:
- name: Generate statistics - name: Generate statistics
run: | run: |
node scripts/dict.js > stats/dict.json 2>&1 & rm stats/*_error.log
ls domains | wc -l > stats/count.txt 2>&1 &
wait node scripts/dict.js > stats/dict.json 2>stats/dict_error.log &
ls domains | wc -l > stats/count.txt 2>stats/count_error.log &
wait
- name: Commit changes - name: Commit changes
run: | run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]" git config --global user.name "github-actions[bot]"
git add stats/dict.json stats/count.txt git add stats
git commit -m "[automated] update stats"
git push if [ -n "$(git status --porcelain)" ]; then
git commit -m "[automated] update stats"
git push
fi