Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ workflows:
'.github/workflows/ossf-best-practices.yml':
- 'actions/checkout@v7.0.1'
'.github/workflows/pages.yml':
- 'actions/cache@v6.1.0'
- 'actions/checkout@v7.0.1'
- 'actions/configure-pages@v6.0.0'
- 'actions/deploy-pages@v5.0.1'
- 'actions/upload-pages-artifact@v5.0.0'
- 'haskell-actions/setup@v2.12.1'
- 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
- 'actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d'
- 'actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346'
- 'actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9'
'.github/workflows/proven-tests.yml':
- 'actions/cache@v6.1.0'
- 'actions/checkout@v7.0.1'
Expand Down Expand Up @@ -118,12 +116,12 @@ dependencies:
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/configure-pages@v6.0.0':
'actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d':
ref: 'v6.0.0'
commit: 'sha1-45bfe0192ca1faeb007ade9deae92b16b8254a0d'
owner_id: 44036562
repo_id: 513659658
'actions/deploy-pages@v5.0.1':
'actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346':
ref: 'v5.0.1'
commit: 'sha1-368f82528645a54fb793d4d04e342629a3f51346'
owner_id: 44036562
Expand All @@ -148,7 +146,7 @@ dependencies:
commit: 'sha1-cf430e030ddbb5b0abf93d22962f4752f3646cd9'
owner_id: 44036562
repo_id: 192625955
'actions/upload-pages-artifact@v5.0.0':
'actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9':
ref: 'v5.0.0'
commit: 'sha1-fc324d3547104276b827a68afc52ff2a11cc49c9'
owner_id: 44036562
Expand Down
127 changes: 70 additions & 57 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,91 +1,104 @@
# This workflow is managed by gh actions-lock.
# SPDX-License-Identifier: MPL-2.0
# GitHub Pages via casket-ssg (hyperpolymath's pure-Haskell static site generator).
# Replaces the orphan one-off Pages deployment with a reproducible build.
# GitHub Pages: the Mathesis atlas site (re-anchoring plan WO 4.3).
# The site is built by `just site` (scripts/site/site.mjs) inside the pinned
# Guix shell (build/channels.scm, build/manifest.scm), then deployed with the
# official Pages actions, each pinned to a full commit SHA.
# Owner step (once): Settings, Pages, Source set to GitHub Actions.
name: GitHub Pages

# Publishing is opt-in until the mathematical atlas is ready.
# Do not deploy template-generated content on every main push.
on:
push:
branches: [main]
workflow_dispatch:

# Least privilege: the build job only reads; only the deploy job may write Pages.
permissions:
contents: read
pages: write
id-token: write

# Serialise Pages deploys; never cancel an in-flight deploy.
concurrency:
group: "pages"
group: pages
cancel-in-progress: false

env:
GUIX_VERSION: "1.5.0"
# SHA-256 of guix-binary-1.5.0.x86_64-linux.tar.xz (same pin as agda-proof-policy.yml).
GUIX_SHA256: "aa41025489c5061543e9c48873eaa829b900b2da75d40f9648913622f5f47817"
BUN_VERSION: "1.4.4"
BUN_SHA256: "bf8ccbfb2b0b80159e0f9a6d15c55317add8077534dbc6130a3edb52fccb395c"

jobs:
build:
timeout-minutes: 20
name: Build the site
runs-on: ubuntu-24.04
timeout-minutes: 45
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7.0.1

- name: Checkout casket-ssg
uses: actions/checkout@v7.0.1
with:
repository: hyperpolymath/casket-ssg
path: .casket-ssg

- name: Setup GHCup
uses: haskell-actions/setup@v2.12.1
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ghc-version: '9.8.2'
cabal-version: '3.10'
persist-credentials: false

- name: Cache Cabal
uses: actions/cache@v6.1.0
with:
path: |
~/.cabal/packages
~/.cabal/store
.casket-ssg/dist-newstyle
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}
- name: Install Guix (checksum-pinned binary release)
run: |
set -euo pipefail
cd "$RUNNER_TEMP"
curl --proto '=https' --proto-redir '=https' --tlsv1.2 --fail --silent --show-error --location \
"https://ftp.gnu.org/gnu/guix/guix-binary-${GUIX_VERSION}.x86_64-linux.tar.xz" --output guix.tar.xz
echo "${GUIX_SHA256} guix.tar.xz" | sha256sum --check --strict
sudo tar --warning=no-timestamp -xf guix.tar.xz -C /
sudo groupadd --system guixbuild
for i in 1 2 3 4; do
sudo useradd -g guixbuild -G guixbuild -d /var/empty -s /usr/sbin/nologin \
-c "Guix build user $i" --system "guixbuilder$i"
done
G=/var/guix/profiles/per-user/root/current-guix
sudo sh -c "nohup $G/bin/guix-daemon --build-users-group=guixbuild > /var/log/guix-daemon.log 2>&1 &"
for _ in $(seq 30); do [ -S /var/guix/daemon-socket/socket ] && break; sleep 1; done
[ -S /var/guix/daemon-socket/socket ] || { sudo cat /var/log/guix-daemon.log; exit 1; }
sudo "$G/bin/guix" archive --authorize < "$G/share/guix/ci.guix.gnu.org.pub"
sudo "$G/bin/guix" archive --authorize < "$G/share/guix/bordeaux.guix.gnu.org.pub"
echo "$G/bin" >> "$GITHUB_PATH"

- name: Build casket-ssg
working-directory: .casket-ssg
run: cabal build
- name: Install Bun (checksum-pinned release archive)
run: |
set -euo pipefail
b="$RUNNER_TEMP/site-bin"; mkdir -p "$b"; cd "$RUNNER_TEMP"
curl --proto '=https' --proto-redir '=https' --tlsv1.2 --fail --silent --show-error --location \
"https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip" --output bun.zip
echo "${BUN_SHA256} bun.zip" | sha256sum --check --strict
unzip -q -j bun.zip bun-linux-x64/bun -d "$b"
echo "$b" >> "$GITHUB_PATH"

- name: Build site
# The same recipe `just site OUT` runs: it fails on any Asciidoctor
# warning and on any broken relative link, and needs an absent or empty OUT.
- name: Build the site in the pinned Guix shell
run: |
mkdir -p site _site
# Seed site/index.md from README if the author hasn't provided one.
if [ ! -f site/index.md ]; then
{
echo "---"
echo "title: $(basename "$PWD")"
echo "date: $(date +%Y-%m-%d)"
echo "---"
if [ -f README.adoc ]; then cat README.adoc
elif [ -f README.md ]; then cat README.md
else printf '\n# %s\n\nDocumentation coming soon.\n' "$(basename "$PWD")"
fi
} > site/index.md
fi
cd .casket-ssg && cabal run casket-ssg -- build ../site ../_site
guix time-machine -C build/channels.scm -- shell -m build/manifest.scm -- \
bun scripts/site/site.mjs build "$GITHUB_WORKSPACE/_site"

- name: Setup Pages
uses: actions/configure-pages@v6.0.0
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

- name: Upload artifact
uses: actions/upload-pages-artifact@v5.0.0
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: '_site'
path: _site

deploy:
timeout-minutes: 20
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-24.04
timeout-minutes: 15
permissions:
pages: write
id-token: write
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
needs: build
steps:
- name: Deploy to GitHub Pages
- name: Deploy
id: deployment
uses: actions/deploy-pages@v5.0.1
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
18 changes: 12 additions & 6 deletions docs/status/ROADMAP.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,24 @@ One pull request that changes census rows is open at a time (atlas README,
clause; `docs/status/PROOF-STATUS.adoc` records the comparison. WO 4.2 is
then done. Next: receipts for APP-1 to APP-4, from a CI run on the merged
commit, then WO 4.3 (needs a ruling).
* WO 4.3, publish the atlas (owner rulings 2026-11-12): site built in CI;
deploy waits for the 2026-11-24 hold and an owner ruling.
* WO 4.3, publish the atlas (owner rulings 2026-11-12; deploy ruled 2026-11-25
by selector in the hub thread): site built in CI; deploy to GitHub Pages is
pending until the first successful run after merge.
** `just site OUT` writes one generated front page, then renders it and the
seven generated views with Asciidoctor (pinned Guix shell,
`ruby-asciidoctor`). `just check` builds the site into a temp dir, so the
Guix job builds it on every pull request and push to main.
** The build fails on any Asciidoctor warning and on any broken relative link.
A link to a repository file outside the site becomes a GitHub link at `main`.
** Not done, by ruling: no deploy job and no Pages settings change. Stage 1
must hold two weeks, so deploy is possible on or after 2026-11-24, after a
fresh owner question. `.github/workflows/pages.yml` stays as it is; the
deploy pull request replaces it.
** Deploy pull request (draft, 2026-11-25): `.github/workflows/pages.yml` now
builds the site in the pinned Guix shell and deploys it with
`configure-pages`, `upload-pages-artifact` and `deploy-pages`, each pinned to
a full commit SHA; `contents: read` for the build, `pages: write` and
`id-token: write` for the deploy job only; one `pages` concurrency group.
It runs on push to main and on dispatch. `actions.lock` is updated to match.
** Owner step, not done by this change: Settings, Pages, Source set to GitHub
Actions. Until then `configure-pages` fails in the build job and the deploy
job is skipped; the site build step before it still runs. Merge is the owner's.
* Open item for the owner (ruling 2026-11-12): none of the JSON Lines data
files declares a licence; JSON has no comment syntax. The owner will write
one `REUSE.toml` rule at the root that covers all of them (doctrine 6: a
Expand Down
Loading