Skip to content

Commit

Permalink
New reusable delete-preview action
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-rose committed Oct 5, 2022
1 parent 97db786 commit 475d8f9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/delete-preview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: delete-preview

on:
workflow_call:

jobs:
delete:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
- name: Delete preview files
run: |
rm -rf _preview/${{ github.event.pull_request.number }}
- name: Commit the changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: gh-pages
commit_message: Delete preview for pull request \#${{ github.event.pull_request.number }}

0 comments on commit 475d8f9

Please sign in to comment.