# Tier 3 gate and publication. The act-runner registration is stored in an # emptyDir: after a runner pod restart, re-register it before debugging CI. name: verify-and-publish on: push: branches: [main] pull_request: # Publication is deliberately manual for the duration of the Astro migration. # See the `publish` job below for why. workflow_dispatch: inputs: publish: description: 'Force-push dist/ to the pages branch' type: boolean default: false jobs: gate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - uses: actions/setup-node@v4 with: node-version: 22 # Node 25 dropped the bundled corepack, and this self-hosted act-runner # is not a good place to discover whether it can fetch a third-party # action. Bootstrapping pnpm with npm needs neither. Keep the version in # step with package.json's `packageManager`. - run: npm install --global pnpm@11.25.0 - run: pnpm install --frozen-lockfile - run: pnpm run lint - run: ./.agents/scripts/gate.sh # The visual-regression step is intentionally absent. `visual-regression.mjs` # only *captures* baselines — it has no compare mode — so in CI it would # overwrite .agents/snapshots/before/ and pass unconditionally. It also # imports `playwright`, which is not a dependency of this project. Wire it # back in once it can actually diff. See task 03's report. publish: # Until the migration finishes, `dist/` holds only /summary/ and the two # hands-on fixtures, while the live `pages` branch serves ten pages. # Publishing on every push to main would take the site down to a stub, so # this job runs only when a human asks for it. Make it unconditional on # main again at task 20 (cutover), not before. if: github.event_name == 'workflow_dispatch' && inputs.publish needs: gate runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 22 - run: npm install --global pnpm@11.25.0 - run: pnpm install --frozen-lockfile - run: pnpm run build - name: Publish generated site to pages run: | git config user.name 'gitea-actions[bot]' git config user.email 'gitea-actions[bot]@users.noreply.local' git switch --orphan pages git rm -rf . cp -a dist/. . git add --all git commit -m 'chore: publish site' git push --force origin HEAD:pages