Skip to content

chore: cleanup unused husky code #2299

chore: cleanup unused husky code

chore: cleanup unused husky code #2299

Workflow file for this run

name: Pull Request Close
on:
pull_request:
branches:
- master
types: [closed]
env:
PUBLISH_REPO: ${{ github.repository_owner }}/${{ github.repository_owner }}.github.io
PUBLISH_BRANCH: master
NEXTRA_PUBLISH_FOLDER: uikit-docs/pr-${{ github.event.number }}
STORYBOOK_PUBLISH_FOLDER: uikit/pr-${{ github.event.number }}
APP_PUBLISH_FOLDER: uikit-app/pr-${{ github.event.number }}
PUBLISH_MESSAGE: "chore: remove PR ${{ github.event.number }} of ${{ github.repository }}"
jobs:
cleanup-deployment:
name: Cleanup Deployment
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ env.PUBLISH_REPO }}
ref: ${{ env.PUBLISH_BRANCH }}
token: ${{ secrets.ORG_GHPAGES_DEPLOY_KEY }}
path: gh-docs
fetch-depth: 1
- name: Remove folder
run: |
cd ${{ github.workspace }}/gh-docs
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git rm -r --ignore-unmatch ${APP_PUBLISH_FOLDER}
git rm -r --ignore-unmatch ${NEXTRA_PUBLISH_FOLDER}
git rm -r --ignore-unmatch ${STORYBOOK_PUBLISH_FOLDER}
git commit -m "${PUBLISH_MESSAGE}"
git push
- name: Prune Deployment for Storybook Documentation
uses: bobheadxi/deployments@v1
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{env.STORYBOOK_PUBLISH_FOLDER}}
desc: Deployment for Stroybook documentation was pruned
- name: Prune Deployment for Nextra Documentation
if: ${{ false }}
uses: bobheadxi/deployments@v1
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{env.NEXTRA_PUBLISH_FOLDER}}
desc: Deployment for Nextra documentation was pruned
- name: Prune Deployment for App
uses: bobheadxi/deployments@v1
with:
step: deactivate-env
token: ${{ secrets.GITHUB_TOKEN }}
env: ${{env.APP_PUBLISH_FOLDER}}
desc: Deployment for app was pruned