diff --git a/.github/workflows/cleanup.yaml b/.github/workflows/cleanup.yaml index 0bb70f0..8fe8ff8 100644 --- a/.github/workflows/cleanup.yaml +++ b/.github/workflows/cleanup.yaml @@ -26,6 +26,8 @@ jobs: ref: generated-docs-preview - name: Clean docs branch run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" cd pr/ # keep the last 25 prs dirs=$(ls -1d [0-9]* | sort -n) @@ -35,5 +37,6 @@ jobs: echo "$dirs_to_remove" | xargs rm -rf fi git add . + git diff --cached --quiet && echo "Nothing to clean up" && exit 0 git commit -m "Cleanup old docs" git push