Skip to content

feat: cache-freshness controls — fresh arg + clear_cache tool (#282) #34

feat: cache-freshness controls — fresh arg + clear_cache tool (#282)

feat: cache-freshness controls — fresh arg + clear_cache tool (#282) #34

Workflow file for this run

name: Deploy Pages
# Publishes the Jekyll site (README + docs/, per _config.yml) to GitHub
# Pages. Replaces the legacy "Deploy from a branch" mechanism, which has
# no concurrency control: rapid merges to main fire overlapping Pages
# deployments and the superseded ones fail with "Deployment failed, try
# again later" — red X's even though the newest deploy always wins and
# the site stays current. The `concurrency` group below serialises
# deploys so an in-flight one finishes before the next starts, ending
# that lock-contention noise.
#
# Requires Settings → Pages → "Build and deployment" → Source set to
# "GitHub Actions" (this workflow is the source; the branch-deploy
# mechanism is retired).
on:
push:
branches: [main]
# Lets you re-publish from the Actions tab without a content change.
workflow_dispatch:
# The token scopes actions/deploy-pages needs.
permissions:
contents: read
pages: write
id-token: write
# Serialise Pages deployments. `cancel-in-progress: false` is the
# GitHub-recommended setting for Pages — an in-flight deploy is allowed
# to finish (cancelling a deploy mid-publish can leave Pages wedged);
# the next run waits its turn instead of racing and failing.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build Jekyll site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Build with Jekyll
# Uses the same github-pages gem set the legacy build used, so
# the output is byte-for-byte what was publishing before —
# only the deploy path changes.
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v5