ci: Remove docs preview when PR is closed
This commit is contained in:
parent
1a36508806
commit
212596f9ba
27
.github/workflows/pr-closed.yml
vendored
Normal file
27
.github/workflows/pr-closed.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: PR Closed
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main, next]
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
docs:
|
||||
name: Remove Docs Preview
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Teardown
|
||||
uses: adrianjost/actions-surge.sh-teardown@v1.0.3
|
||||
with:
|
||||
regex: pr-${{ github.event.number }}--ruma-docs.surge.sh
|
||||
env:
|
||||
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
|
||||
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
|
||||
|
||||
- name: Remove preview URL
|
||||
uses: Beakyn/gha-comment-pull-request@v1.0.2
|
||||
id: deploy-preview
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
with:
|
||||
description-message: Preview removed
|
Loading…
x
Reference in New Issue
Block a user