Skip to content

chore: Do not show transparent border in Storybook in forced colors mode #451

chore: Do not show transparent border in Storybook in forced colors mode

chore: Do not show transparent border in Storybook in forced colors mode #451

# 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 }}