fix: Author was incorrectly assigned to commit

This commit is contained in:
Bart van der Braak 2023-06-12 04:22:48 +02:00
parent 0adede769b
commit 02194d5490

View file

@ -20,12 +20,14 @@ jobs:
- name: Delete directory in gh-pages
if: github.event.ref_type == 'branch'
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git fetch --all
git checkout gh-pages
branchName=$(echo "${{ github.event.ref }}" | sed -e 's,^refs/heads/,,')
if [ -d "./${branchName}" ]; then
git rm -rf --ignore-unmatch "${branchName}"
git commit -m "Cleanup directory for deleted branch ${branchName}" --author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
git commit -m "Cleanup directory for deleted branch ${branchName}"
git push origin gh-pages
else
echo "Directory doesn't exist for branch ${branchName}"