Skip to content

Commit

Permalink
Merge e68c5e1 into 7364bdc
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed May 6, 2021
2 parents 7364bdc + e68c5e1 commit 7439223
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/clean_pr_preview.yaml
@@ -0,0 +1,40 @@
name: Clean PR preview

on:
pull_request:
types: [ closed ]

jobs:

deploy-pr:
name: '🧹 Clean PR preview'
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
ref: gh-pages

- name: 'Remove PR folder if it exists'
run: rm -Rf pr/${{ github.event.number }}

- name: 'Git status'
run: git status

# https://github.com/EndBug/add-and-commit
- name: 'Commit & push changes'
uses: EndBug/add-and-commit@v4
with:
author_name: GitHub Actions Bot
author_email: actions@github.com
COMMIT_MESSAGE: |
[AUTO] Removed deployment for PR #${{ github.event.number }}
for commit ${{ github.sha }}
add: "./pr/"
ref: gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7439223

Please sign in to comment.