-
Notifications
You must be signed in to change notification settings - Fork 5
31 lines (29 loc) · 1016 Bytes
/
pr-close.yml
File metadata and controls
31 lines (29 loc) · 1016 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
# Removes specific build underneath the pull/ directory in gh-pages branch when the relevant PR closes.
name: Clean-up PR Preview
on:
pull_request:
types: [closed]
jobs:
clean-pr-preview:
runs-on: ubuntu-latest
env:
PR_NUM: ${{ github.event.pull_request.number }}
steps:
- name: Checkout 🚧
uses: actions/checkout@v2
- name: Create Empty Directory 🗑️
run: mkdir ${{ env.PR_NUM }}
- name: Delete Directory 🪓
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PR_NUM }}
destination_dir: pull/${{ env.PR_NUM }}
- name: Update comment on PR 💬
uses: hasura/comment-progress@v2.2.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
number: ${{ github.event.number }}
id: deploy-preview
message: "🫰🏼 PR preview build has been deleted"