Skip to content

Fjerner preview-branch for "Oppgrader remix til v2" #773

Fjerner preview-branch for "Oppgrader remix til v2"

Fjerner preview-branch for "Oppgrader remix til v2" #773

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