From 0c3ccb2703a77a3763151137ef0d5f1d1e4b4273 Mon Sep 17 00:00:00 2001 From: Rebecca Breu Date: Sun, 18 Jul 2021 16:05:52 +0200 Subject: [PATCH] Action to rebuild website on release --- .github/workflows/update_website.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/update_website.yml diff --git a/.github/workflows/update_website.yml b/.github/workflows/update_website.yml new file mode 100644 index 0000000..2535801 --- /dev/null +++ b/.github/workflows/update_website.yml @@ -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 }}