Fjerner preview-branch for "Oppgrader remix til v2" #773
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Closed | |
on: | |
pull_request: | |
types: [closed] | |
run-name: Fjerner preview-branch for "${{ github.event.pull_request.title }}" | |
jobs: | |
remove-preview: | |
runs-on: ubuntu-20.04 | |
permissions: | |
actions: write | |
contents: write | |
env: | |
PREVIEW_PATH: preview/${{ github.event.pull_request.head.ref }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: gh-pages | |
- name: Remove preview from gh-pages branch | |
# Ikke alle pull requests har laget noen preview. Ignorer om det feiler. | |
continue-on-error: true | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "fremtind-bot" | |
git rm -r ${{ env.PREVIEW_PATH }} | |
git commit -m "docs: remove preview #${{ github.event.number }}" --no-verify | |
git push |