Skip to content

chore: Write README for all packages except tokens #498

chore: Write README for all packages except tokens

chore: Write README for all packages except tokens #498

# Based on https://evilmartians.com/chronicles/super-github-pages-budget-frontend-staging-with-storybook-and-more
name: Feature branch cleanup
on:
pull_request:
types: [closed]
branches-ignore: [main]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
remove_stale_pages:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Create branch name without text before first forward slash
run: |
RAW_BRANCH_NAME=${{ github.head_ref || github.ref_name }}
BRANCH_NAME=$(echo $RAW_BRANCH_NAME | sed 's/[^/]*\///')
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Check out
uses: actions/checkout@v4
with:
ref: gh-pages
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Delete folder
run: |
git config --global user.name GitHub Action
git config --global user.email [email protected]
git rm demo-${{ env.BRANCH_NAME }} -r
git add .
git commit -m "Remove feature branch folder"
git push
- name: Deactivate deployment
uses: bobheadxi/deployments@v1
if: always()
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: demo-${{ env.BRANCH_NAME }}