Skip to content

Bump peter-evans/create-pull-request from 6 to 7 #349

Bump peter-evans/create-pull-request from 6 to 7

Bump peter-evans/create-pull-request from 6 to 7 #349

---
name: Delete pull request preview
on:
pull_request:
# Run when label is removed or pull request closed
types: [unlabeled, closed]
permissions: read-all
jobs:
delete_preview:
# Do not run on forks, and only if "safe for preview" label is set
if: >
github.repository == 'EGI-Federation/documentation' &&
((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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: "pr_previews"
- name: Delete pull request preview and commit changes
uses: EndBug/add-and-commit@v9
with:
branch: "pr_previews"
remove: "-r ${{ github.event.number }}/"
message: "Purge preview for PR ${{ github.event.number }}"