Scheduled Pages Rebuild #80
This file contains hidden or 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: Scheduled Pages Rebuild | |
on: | |
schedule: | |
- cron: '0 14 * * *' # every day at 14:00 UTC → 07:00 PDT | |
workflow_dispatch: | |
# give the workflow permission to kick off a Pages build | |
permissions: | |
contents: read # we don’t need to write code | |
pages: write # allows GITHUB_TOKEN to call the Pages Builds API | |
jobs: | |
rebuild: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger GitHub Pages build | |
run: | | |
curl -X POST \ | |
-H "Accept: application/vnd.github.ant-man-preview+json" \ | |
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
https://api.github.com/repos/${{ github.repository }}/pages/builds |