Skip to content

Commit

Permalink
chore: adjust delete PR workflow name and set required permissions (#692
Browse files Browse the repository at this point in the history
)

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.
  • Loading branch information
gwarf authored Jan 9, 2025
1 parent 8bcd6bf commit 287c824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
# Run when label is added or present and when pushing to the PR
types: [labeled, opened, synchronize]

permissions:
contents: write
permissions: read-all

jobs:
build_preview:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/delete_pr_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
((github.event.action == 'unlabeled' && github.event.label.name == 'safe
for preview') || (github.event.action == 'closed' &&
contains(github.event.pull_request.labels.*.name, 'safe for preview')))
name: Build with Hugo
name: Delete PR preview when a PR is closed or label removed
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down

1 comment on commit 287c824

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

❌ Errors Count
❌ no-files-to-check 1

See ❌ Event descriptions for more information.

Please sign in to comment.