Perception infrastructure #21
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: Cleanup Preview | |
| on: | |
| pull_request: | |
| types: [closed] | |
| jobs: | |
| delete-preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout gh-pages branch | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Remove preview folder for PR | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| rm -rf previews/pr-${{ github.event.pull_request.number }} | |
| git add -A | |
| git commit -m "🧹 Remove preview for PR #${{ github.event.pull_request.number }}" || echo "Nothing to commit" | |
| git push origin gh-pages |