Skip to content

Cleanup GitHub Pages #85

Cleanup GitHub Pages

Cleanup GitHub Pages #85

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