Skip to content

1395 as a subscriber i can download my own invoices #225

1395 as a subscriber i can download my own invoices

1395 as a subscriber i can download my own invoices #225

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