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: Cleanup Preview | ||
on: | ||
pull_request: | ||
types: [closed] | ||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Remove Docker Container | ||
run: | | ||
ssh [email protected] "docker rm -f preview-${{ github.head_ref }}" | ||
- name: Remove NGINX Configuration | ||
run: | | ||
ssh [email protected] "bash /home/phil/scripts/cleanup_nginx.sh ${{ github.head_ref }}" | ||
- name: Remove DNS Record in Cloudflare | ||
with: | ||
apiKey: ${{ secrets.CLOUDFLARE_API_KEY }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
zoneId: ${{ secrets.CLOUDFLARE_ZONE_ID }} | ||
run: | | ||
Check failure on line 24 in .github/workflows/cleanup.yml
|
||
cloudflare-cli dns delete "${{ github.head_ref }}.preview.t7lab.com" |