Skip to content

feat!: Disallow blue Spotlight and make purple the default #578

feat!: Disallow blue Spotlight and make purple the default

feat!: Disallow blue Spotlight and make purple the default #578

# 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 branch to access .nvmrc
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: .nvmrc
- name: Check out gh-pages branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: gh-pages
- 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@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1.5.0
if: always()
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: demo-${{ env.BRANCH_NAME }}