Skip to content

fix(text): prevent always running detect text alignment #209

fix(text): prevent always running detect text alignment

fix(text): prevent always running detect text alignment #209

name: Remove Styleguide & Lab
on:
pull_request:
types:
- closed
# the only downside of this workflow is that after
# it removes the styleguide & lab deploys it doesn't
# re-generate the deploy index which I think is okay
# since it regularly gets generated in other workflows
# which will clean up any removed dead links
jobs:
remove-styleguide-lab:
name: Remove Styleguide & Lab
runs-on: ubuntu-latest
concurrency: changes-deploys
steps:
- name: Checkout Maker deploys branch
uses: actions/checkout@v2
with:
repository: square/maker
ref: deploys
- name: Remove Styleguide & Lab
run: |
git config user.name github-actions
git config user.email github-actions@github.com
STYLEGUIDE_DEPLOY="styleguide/${GITHUB_HEAD_REF}"
LAB_DEPLOY="lab/${GITHUB_HEAD_REF}"
rm -rf "${STYLEGUIDE_DEPLOY}"
rm -rf "${LAB_DEPLOY}"
git add --all
COLON=$(printf "\x3a") # need to escape colon char for yaml
COMMIT_MSG="docs${COLON} removes ${GITHUB_HEAD_REF} styleguide & lab after PR closed"
# next line only fails if deploys were already deleted
# which is ok, so we silence the failure with "|| true"
git commit -m "${COMMIT_MSG}" || true
git push