Fix #1406 introduce sentry to better diagnose runtime errors #230
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: remove pr preview | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
Delete: | |
environment: testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: remove pr preview | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
DOKKU_HOST: ${{ secrets.DOKKU_HOST }} | |
run: | | |
set -x | |
mkdir -p ~/.ssh | |
ssh-keyscan ${{ secrets.DOKKU_HOST }}>> ~/.ssh/known_hosts | |
eval `ssh-agent -s` | |
ssh-add - <<< "$SSH_PRIVATE_KEY" | |
echo SUBDOMAIN=`echo "${{ github.head_ref }}" | tr '[:upper:]' '[:lower:]' | cut -c -60 | rev | sed 's/[^[:alnum:]]//1' | rev` >> $GITHUB_ENV | |
echo deleting dokku app ${{ env.SUBDOMAIN }} | |
ssh dokku@$DOKKU_HOST -C "dokku -- --force apps:destroy ${{ env.SUBDOMAIN }}" |