✍️ edit: TOC 하단 공백 일괄 제거 #40
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: Clean PR Preview | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: gh-pages | |
| token: ${{ secrets.MY_GITHUB_TOKEN }} | |
| - name: Remove PR preview | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| if [ -d "pull/${{ github.event.number }}" ]; then | |
| rm -rf pull/${{ github.event.number }} | |
| git add . | |
| git commit -m "🗑️ Remove PR #${{ github.event.number }} preview" | |
| git push origin gh-pages | |
| fi |