Skip to content

DNS record is now managed by infra config #22

DNS record is now managed by infra config

DNS record is now managed by infra config #22

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