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
20 changes: 20 additions & 0 deletions .assetsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# What stays out of the static asset upload. The repo root is the site, so without this
# list the working agreement, the checks and the review config would be served to anyone
# who asked for them, which GitHub Pages was doing until 12 November 2026.
.git
.github
.githooks
.claude
.wrangler
.DS_Store
.gitignore
.coderabbit.yaml
.assetsignore
*.md
CNAME
docs
functions
tools
lychee.toml
lighthouserc.json
wrangler.toml
7 changes: 4 additions & 3 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ reviews:
has a prefers-reduced-motion branch.
- path: "functions/**"
instructions: >-
Cloudflare Pages Functions. Secrets come from env bindings, never code. Validate every
The Cloudflare Worker and its routes, deployed by Workers Builds. Secrets come from env bindings, never code. Validate every
input, verify Stripe webhook signatures, return no-store on dynamic responses, never
log request bodies. No npm dependencies, the Workers runtime APIs only.
- path: "tools/**"
Expand All @@ -86,8 +86,9 @@ reviews:
blocklist, because this repository is public.
- path: ".github/workflows/**"
instructions: >-
Least privilege on permissions, actions pinned to a major version tag, no secrets
echoed. checks.yaml must stay equivalent to what tools/check runs locally.
Deny-all permissions at the top with per-job grants, persist-credentials off on every
checkout, every action in actions.lock, no secrets echoed. checks.yaml must stay
equivalent to what tools/check runs locally.
- path: "{CHANGELOG.md,CLAUDE.md,AGENTS.md,README.md}"
instructions: >-
Prose follows CLAUDE.md Brand voice. No em dashes. A new page needs a row in the
Expand Down
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Keeps the workflow actions current. Each PR it opens updates the tag in the workflow and
# the matching commit in actions.lock together. There is nothing else to update: the site
# has no package manager by design.
version: 2
updates:
- package-ecosystem: github-actions
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
directory: /
schedule:
interval: weekly
day: monday
time: "07:00"
timezone: America/New_York
# A new release waits a week before Dependabot proposes it, so a hijacked tag that gets
# yanked in its first days never reaches a PR here.
cooldown:
default-days: 7
groups:
actions:
patterns: ["*"]
commit-message:
prefix: "ci"
79 changes: 79 additions & 0 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# This file is machine-generated by `gh actions-lock`.
# Do not edit by hand; run `gh actions-lock` to update.
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/checks.yaml':
- 'actions/checkout@v7.0.1'
- 'lycheeverse/lychee-action@v2.9.0'
- 'treosh/lighthouse-ci-action@12.6.2'
- 'zizmorcore/zizmor-action@v0.8.1'
'.github/workflows/ci.yaml':
- 'actions/checkout@v7.0.1'
- 'actions/configure-pages@v6.0.0'
- 'actions/deploy-pages@v5.0.1'
- 'actions/upload-pages-artifact@v5.0.0'
'.github/workflows/scorecard.yaml':
- 'actions/checkout@v7.0.1'
- 'github/codeql-action@v4.39.3'
- 'ossf/scorecard-action@v2.5.0'
dependencies:
'actions/checkout@v7.0.1':
ref: 'v7.0.1'
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
owner_id: 44036562
repo_id: 197814629
'actions/configure-pages@v6.0.0':
ref: 'v6.0.0'
commit: 'sha1-45bfe0192ca1faeb007ade9deae92b16b8254a0d'
owner_id: 44036562
repo_id: 513659658
'actions/deploy-pages@v5.0.1':
ref: 'v5.0.1'
commit: 'sha1-368f82528645a54fb793d4d04e342629a3f51346'
owner_id: 44036562
repo_id: 438112499
'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f':
ref: 'v7.0.0'
commit: 'sha1-bbbca2ddaa5d8feaa63e36b76fdaad77386f024f'
owner_id: 44036562
repo_id: 192625955
'actions/upload-pages-artifact@v5.0.0':
ref: 'v5.0.0'
commit: 'sha1-fc324d3547104276b827a68afc52ff2a11cc49c9'
owner_id: 44036562
repo_id: 496012378
uses:
- 'actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f'
'github/codeql-action@9b3254085494b55a0f7c4c2b3d2d52cc712ce370':
ref: 'v4.39.1'
commit: 'sha1-9b3254085494b55a0f7c4c2b3d2d52cc712ce370'
owner_id: 9919
repo_id: 259445878
'github/codeql-action@v4.39.3':
ref: 'v4.39.3'
commit: 'sha1-33d7b85da1a04171e211befe2c739303b9a4c066'
owner_id: 9919
repo_id: 259445878
'lycheeverse/lychee-action@v2.9.0':
ref: 'v2.9.0'
commit: 'sha1-e7477775783ea5526144ba13e8db5eec57747ce8'
owner_id: 74027027
repo_id: 320929718
'ossf/scorecard-action@v2.5.0':
ref: 'v2.5.0'
commit: 'sha1-fa7117db83c52d787ae5a89f350999701505d78e'
owner_id: 67707773
repo_id: 421101922
'treosh/lighthouse-ci-action@12.6.2':
ref: '12.6.2'
commit: 'sha1-3e7e23fb74242897f95c0ba9cabad3d0227b9b18'
owner_id: 30832600
repo_id: 210552904
'zizmorcore/zizmor-action@v0.8.1':
ref: 'v0.8.1'
commit: 'sha1-45d7276c9ca790aabd705e31ca99c6185c3e76dd'
owner_id: 210636713
repo_id: 985558803
uses:
- 'github/codeql-action@9b3254085494b55a0f7c4c2b3d2d52cc712ce370'
107 changes: 99 additions & 8 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,59 @@
# The checks every PR has to pass before O.J. merges it. The same four jobs tools/check runs
# locally, plus the two that only make sense on GitHub: the workflow linters, and the gate
# that keeps hand edits out of the generated agents/ pages.
#
# Job names are referenced by the ruleset on main as required checks. Rename one here and
# the ruleset has to change with it, so the four tools/check names stay as they are.
#
# Actions are referenced by tag for readability. The exact commits that run are recorded in
# actions.lock beside this file (gh actions-lock), and Dependabot updates both together.

name: Checks

on:
pull_request:
workflow_dispatch:

permissions:
contents: read
# Deny everything at the top. Each job grants only what it reads.
permissions: {}

# A newer push to the same PR cancels the run in progress.
concurrency:
group: checks-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
last-updated:
name: Living pages carry the date git says
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout with history
uses: actions/checkout@v4
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Check the dates
run: python3 tools/last-reviewed/check.py

local-checks:
name: Names, HTML validity (the same run as tools/check)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
# tools/check runs the living-pages date check too, and that reads dates from git, so
# this job needs the same full history as the job above. A shallow checkout dates
# every file to the merge commit, which only passes on the day a page last changed.
- name: Checkout with history
uses: actions/checkout@v4
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.sha }}
persist-credentials: false

- name: Install HTML Tidy
run: sudo apt-get update -q && sudo apt-get install -y -q tidy
Expand All @@ -43,24 +64,94 @@ jobs:
links:
name: Internal links resolve
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false

- name: lychee, offline
uses: lycheeverse/lychee-action@v2
uses: lycheeverse/lychee-action@v2.9.0
with:
args: --offline --no-progress --config lychee.toml --root-dir ${{ github.workspace }} '*.html' 'agents/**/*.html'
fail: true

lighthouse:
name: Lighthouse on the main pages
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false

- name: Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
uses: treosh/lighthouse-ci-action@12.6.2
with:
configPath: lighthouserc.json
uploadArtifacts: true
temporaryPublicStorage: true

workflows:
name: Workflows are pinned, linted and least-privilege
runs-on: ubuntu-latest
permissions:
contents: read
# zizmor uploads its findings as SARIF so they show under Security, Code scanning.
security-events: write
steps:
- uses: actions/checkout@v7.0.1
with:
persist-credentials: false

# The lockfile has to match the workflows. --no-fix writes nothing and exits 1 when a
# workflow references an action the lockfile does not pin.
- name: The lockfile covers every action
run: |
gh extension install github/gh-actions-lock
gh actions-lock --no-fix
env:
GH_TOKEN: ${{ github.token }}

- name: actionlint, workflow syntax and expression mistakes
run: docker run --rm -v "${PWD}:/repo" --workdir /repo rhysd/actionlint:1.7.12 -color

- name: zizmor, workflow security
uses: zizmorcore/zizmor-action@v0.8.1
with:
min-severity: low

generated:
name: Generated pages only change in a regeneration
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
persist-credentials: false

# agents/** is built from the internal repo by its publisher and never edited here by
# hand. A regeneration PR announces itself in the title, so anything else touching those
# files is a hand edit and fails. Same rule CodeRabbit's custom check describes, enforced
# where it cannot be skipped.
- name: Hand edits under agents/ fail
env:
TITLE: ${{ github.event.pull_request.title }}
BASE: ${{ github.event.pull_request.base.sha }}
HEAD: ${{ github.event.pull_request.head.sha }}
run: |
if [ -z "$BASE" ]; then echo "not a pull request, nothing to compare"; exit 0; fi
changed=$(git diff --name-only "$BASE...$HEAD" -- agents/ || true)
if [ -z "$changed" ]; then echo "agents/ untouched"; exit 0; fi
case "$TITLE" in
"regenerate /agents"*) echo "regeneration PR, agents/ changes allowed"; exit 0 ;;
esac
echo "This PR changes generated pages without a 'regenerate /agents' title:"
printf '%s\n' "$changed" | sed 's/^/ /'
echo
echo "Change the source in the internal repo and regenerate with the publisher."
exit 1
37 changes: 21 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# GitHub Pages, the hosting learnwithoj.com still points at. It stays until O.J. cuts DNS
# over to the Worker that Workers Builds publishes, then this file goes. Until that day both
# deploy on every merge, and the one the domain points at is what visitors see.

name: Deploy to GitHub Pages

on:
push:
branches:
- main # or 'master' if that's your default branch
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
permissions: {}

concurrency:
group: "pages"
group: pages
cancel-in-progress: false

jobs:
Expand All @@ -21,19 +21,24 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

uses: actions/checkout@v7.0.1
with:
persist-credentials: false

- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v6.0.0

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v5.0.0
with:
path: '.'
path: "."

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

uses: actions/deploy-pages@v5.0.1
Loading
Loading