Action to rebuild website on release

This commit is contained in:
Rebecca Breu 2021-07-18 16:05:52 +02:00
parent d9ebf934c7
commit 0c3ccb2703

20
.github/workflows/update_website.yml vendored Normal file
View file

@ -0,0 +1,20 @@
name: Update Website
on:
- workflow_dispatch
- release:
types: [published]
jobs:
refresh:
runs-on: ubuntu-latest
steps:
- name: Trigger GitHub pages rebuild
run: |
curl --fail --request POST \
--url https://api.github.com/repos/${{ github.repository }}/pages/builds \
--header "Authorization: Bearer $USER_TOKEN"
env:
# You must create a personal token with repo access as GitHub does
# not yet support server-to-server page builds.
USER_TOKEN: ${{ secrets.USER_TOKEN }}