From 70d5a89de06c2cdd07ae758bc4e21d176dd8e0ab Mon Sep 17 00:00:00 2001 From: gorositopablo Date: Wed, 14 Jun 2023 10:27:37 +0100 Subject: [PATCH] Create rebuild.yml Rebuilds GitHub Pages using Pages API, in order to force update "copyright" date in the footer, as apparently it change at the build. --- .github/workflows/rebuild.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/rebuild.yml diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml new file mode 100644 index 0000000..869db35 --- /dev/null +++ b/.github/workflows/rebuild.yml @@ -0,0 +1,20 @@ +# File: .github/workflows/rebuild.yml +name: 'GitHub Pages Re-Build' +# description: 'Rebuilds GitHub Pages using Pages API' +on: + schedule: + - cron: '0 4 1 1 *' # Runs At 04am (it use UTC time) on day-of-month 1 in January + +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 }}