diff --git a/.github/workflows/gh-pages-cleanup.yaml b/.github/workflows/gh-pages-cleanup.yaml index e8e541b..c19ab30 100644 --- a/.github/workflows/gh-pages-cleanup.yaml +++ b/.github/workflows/gh-pages-cleanup.yaml @@ -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}"