Refractor v2 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cleanup PR | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: documentation | |
- name: Delete coverage/documentation for ${{ github.event.pull_request.number }} from documentation branch | |
run: | | |
folder_to_delete="${{ github.event.pull_request.number }}/merge" | |
echo "Deleting folder: $folder_to_delete from documentation" | |
rm -rf "$folder_to_delete" | |
git rm -r "$folder_to_delete" || true | |
- name: Configure Git for Pushing Deletion change | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Commit Deletion Change | |
run: | | |
git add -A | |
pr="${{ github.event.pull_request.number }}" | |
git commit -m "Remove folder ${pr}/merge from documentation branch because PR ${pr} is closed" | |
- name: Pushing Deletion Change | |
run: | | |
git push origin documentation |