diff --git a/.github/workflows/ci-delete-pr-preview.yml b/.github/workflows/ci-delete-pr-preview.yml index 0f983475..95584c88 100644 --- a/.github/workflows/ci-delete-pr-preview.yml +++ b/.github/workflows/ci-delete-pr-preview.yml @@ -29,5 +29,9 @@ jobs: run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com" - git commit -am "🚮 Remove preview for closed PR #${{ github.event.pull_request.number }}" - git push + if git diff --cached --quiet; then + echo "No changes to commit" + else + git commit --amend -m "🚮 Remove preview for closed PR #${{ github.event.pull_request.number }}" + git push --force + fi \ No newline at end of file