GitHub Pages
In your terminal ssqch docs "GitHub Pages"
A project site is served at https://you.github.io/<repository>/, so the build needs that path as its base. This workflow builds on every push to main and deploys with GitHub's own Pages actions (in the repository's settings, set Pages' source to "GitHub Actions"):
# .github/workflows/pages.yml
name: Deploy to GitHub Pages
on:
push:
branches: [main]
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # every commit, for `lastModified: "git"` (the starters set it)
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
# ssqch's cache between runs: a new key each run, which restores the newest one saved.
- uses: actions/cache@v6
with:
path: .cache/ssqch
key: ssqch-${{ github.run_id }}
restore-keys: ssqch-
- run: npx ssqch build --output dist --base "/${{ github.event.repository.name }}/"
- uses: actions/upload-pages-artifact@v3
with:
path: dist
- id: deployment
uses: actions/deploy-pages@v4
--basetakes the repository's name from the workflow, so the config doesn't have to know it andssqch serveon your machine still serves the site at/. A user site (you.github.io) or one with a custom domain is at the root: leave--baseoff.- The version is the site's
ssqchdev dependency, pinned by its lockfile, so a new release can't surprise a deploy.node-versioncan be any Node from 22.18 on. A site without apackage.jsonreplacesnpm ciwithnpm install --global ssqch@0.17.1(dropcache: npm, which looks for a lockfile) and runsssqch buildinstead ofnpx ssqch build. - A 404 page: GitHub Pages serves
404.htmlfrom the site's root, so give your 404 pagepermalink: /404.html. - ssqch's cache: the
actions/cachestep keeps.cache/ssqchfrom one run to the next; without it every run starts from nothing and encodes every image again. Among what the folder holds: the encoded images and their hashes (see Keep the image cache between builds), the highlighted code, the answers of eachfetchwith acache, themes taken from git, and the list of what the last build wrote, which is how the build summary counts new and gone pages from one run to the next. - Markdown for agents: GitHub Pages can't vary an answer by the request's
Accept, so agents find a page's Markdown copy through its<link rel="alternate">andllms.txt(Serving Markdown to agents).