-
Notifications
You must be signed in to change notification settings - Fork 10
34 lines (28 loc) · 932 Bytes
/
pr-cleanup.yml
File metadata and controls
34 lines (28 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: 'CI: Docs Cleanup'
on:
pull_request_target:
types: [closed]
permissions:
pull-requests: write
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Remove Surge deployment
run: |
DEPLOY_DOMAIN=preview-${{ github.event.pull_request.number }}-tiny-robot.surge.sh
echo "Removing deployment: $DEPLOY_DOMAIN"
npx surge teardown $DEPLOY_DOMAIN --token $SURGE_TOKEN
env:
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
continue-on-error: true
- name: Comment cleanup status
uses: actions-cool/maintain-one-comment@v3.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
body: |
## 🧹 Preview Cleaned Up
The preview deployment has been removed.
<!-- DEPLOY_PREVIEW -->
body-include: '<!-- DEPLOY_PREVIEW -->'
number: ${{ github.event.pull_request.number }}