Skip to content

Commit 287c824

Browse files
authored
chore: adjust delete PR workflow name and set required permissions (#692)
I think the deletion of PR preview never works, let's see if we can get it working, to be tested with some future PR.
1 parent 8bcd6bf commit 287c824

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/build_pr_preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ on:
88
# Run when label is added or present and when pushing to the PR
99
types: [labeled, opened, synchronize]
1010

11-
permissions:
12-
contents: write
11+
permissions: read-all
1312

1413
jobs:
1514
build_preview:

.github/workflows/delete_pr_preview.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
((github.event.action == 'unlabeled' && github.event.label.name == 'safe
1717
for preview') || (github.event.action == 'closed' &&
1818
contains(github.event.pull_request.labels.*.name, 'safe for preview')))
19-
name: Build with Hugo
19+
name: Delete PR preview when a PR is closed or label removed
20+
permissions:
21+
contents: write
2022
runs-on: ubuntu-latest
2123
steps:
2224
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)