Cleanup GitHub Pages #81
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 GitHub Pages | |
on: | |
delete: | |
jobs: | |
cleanup-storybook: | |
runs-on: | |
- ubuntu-latest | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot/') }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Generate directory name | |
id: dir_name | |
shell: bash | |
run: | | |
DIR_NAME=${{ github.event.ref }} | |
DIR_NAME=${DIR_NAME#refs/heads/} | |
DIR_NAME=${DIR_NAME////_} | |
echo "DIR_NAME=$DIR_NAME" >> $GITHUB_ENV | |
- name: Commit & Push | |
run: | | |
git config user.name uyupunpopunpo | |
git config user.email [email protected] | |
git rm -r $DIR_NAME | |
git commit -m "Remove $DIR_NAME directory" | |
git push |