Cleanup Docs #7
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 Docs | |
on: delete | |
jobs: | |
Clean-Up-Test-Docs: | |
runs-on: ubuntu-20.04 | |
# permissions: | |
# contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Clean up docs | |
run: | | |
echo "Clean up for branch ${{ github.event.ref }}" | |
git fetch | |
git checkout gh-pages | |
git rm -r ${{ github.event.ref }} | |
rm -rf ${{ github.event.ref }} | |
git commit -m "clean up documentations for ${{ github.event.ref }}" -a || true | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages |