-
-
Notifications
You must be signed in to change notification settings - Fork 742
30 lines (26 loc) · 967 Bytes
/
Copy pathpr-preview-cleanup.yml
File metadata and controls
30 lines (26 loc) · 967 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
name: pr-preview-cleanup
# Removes the GitHub Pages e2e-report preview that `build.yml`'s `deploy-report`
# job published for a PR, once that PR is closed/merged. Kept separate from
# `build.yml` so closing a PR doesn't re-run the whole build + e2e suite.
on:
pull_request:
types: [closed]
permissions:
contents: write
pull-requests: write
jobs:
remove-preview:
name: "Remove E2E Report Preview"
runs-on: ubuntu-latest
# Fork PRs never got a preview (read-only token), so nothing to remove.
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- name: Remove PR preview
uses: rossjrw/pr-preview-action@ffa7509e91a3ec8dfc2e5536c4d5c1acdf7a6de9 # v1
with:
preview-branch: gh-pages
umbrella-dir: pr-preview
action: remove