diff --git a/.github/workflows/pages-refresh.yml b/.github/workflows/pages-refresh.yml new file mode 100644 index 0000000..03c4d5a --- /dev/null +++ b/.github/workflows/pages-refresh.yml @@ -0,0 +1,22 @@ +name: pages refresh + +# GitHub Pages only builds when the publishing branch changes, and +# `future: false` hides future-dated posts at build time. Request a build once a +# day so a post dated for today goes live without needing a push. +on: + schedule: + - cron: "15 6 * * *" # daily 06:15 UTC + workflow_dispatch: + +permissions: + contents: read + pages: write + +jobs: + rebuild: + runs-on: ubuntu-latest + steps: + - name: Request a GitHub Pages build + env: + GH_TOKEN: ${{ github.token }} + run: gh api --method POST "repos/${GITHUB_REPOSITORY}/pages/builds" diff --git a/AGENTS.md b/AGENTS.md index c0c7f5c..772b095 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -48,7 +48,8 @@ separate PRs. Do not mix them unless the user explicitly asks for one PR. - The filename slug is the public URL (`/YYYY/MM/DD/.html`), so choose the final name here rather than during drafting. - `date` is the intended publication date, not the date the draft was written. - A future date schedules the post and is allowed. + A future date is allowed. `.github/workflows/pages-refresh.yml` rebuilds the + site daily, so the post appears within a day of that date without a push. - Done when `bundle exec jekyll build` passes and the rendered URL, title, date, and tags are correct.