LifeSim Applications Guide ready for official release/move up the review chain. #9
This file contains hidden or 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: PR Preview Cleanup | |
| on: | |
| pull_request: | |
| types: [closed] | |
| permissions: | |
| contents: read | |
| jobs: | |
| cleanup: | |
| name: Delete preview directory | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: usace-rmc/RMC-Software-Documentation-Previews | |
| ref: gh-pages | |
| ssh-key: ${{ secrets.PREVIEW_DEPLOY_KEY }} | |
| - name: Remove PR preview directory | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if [ -d "pr-${PR_NUMBER}" ]; then | |
| rm -rf "pr-${PR_NUMBER}" | |
| git add -A | |
| git commit -m "Clean up preview for PR #${PR_NUMBER}" | |
| git push | |
| fi |