Skip to content

Publish 2026-06-12T15:46:52Z from dd91cf6 #19

Publish 2026-06-12T15:46:52Z from dd91cf6

Publish 2026-06-12T15:46:52Z from dd91cf6 #19

Workflow file for this run

# GitHub Pages workflow - Path A.
#
# Draft. Lives under .plans/deploy-modes/ until promoted to .github/workflows/pages.yml.
# After promotion, enable Pages with source=GitHub Actions in repo Settings → Pages.
#
# Why a workflow instead of "Pages serves the branch root":
# - Branch-source Pages publishes the entire repo, leaking worker/, .plans/,
# node_modules/, etc.
# - This workflow builds a clean artifact that matches the .assetsignore
# exclusion list (same logical site the Worker bundles for Path B).
# - Custom 404, future minify/sri/etc become possible without a build step today.
#
# Triggers:
# - push to main: deploys.
# - workflow_dispatch: manual one-off run from the Actions tab.
#
# Permissions:
# - contents: read (checkout)
# - pages: write (publish artifact)
# - id-token: write (OIDC for actions/deploy-pages)
name: Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
name: Build site artifact
runs-on: ubuntu-latest
# Default deploy mode is Pages. Gate via repo Actions variable DEPLOY_MODE:
# unset or 'pages' -> this workflow runs
# 'worker' -> this workflow is skipped, deploy.yml takes over
if: vars.DEPLOY_MODE == '' || vars.DEPLOY_MODE == 'pages'
steps:
- uses: actions/checkout@v6
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install deps
run: bun install --frozen-lockfile
- name: Build CSS
run: bun run css
- name: Build asset manifest
run: bun run scripts/build-manifest.ts
- name: Run tests
run: bun test
- name: Stage clean site root
run: |
set -euo pipefail
mkdir -p _site
rsync -a --delete \
--exclude 'tests/' \
--exclude 'scripts/' \
--exclude 'package.json' \
--exclude '.git/' \
--exclude '.github/' \
--exclude '.plans/' \
--exclude '.brainstorming/' \
--exclude '.backups/' \
--exclude '._docs/' \
--exclude '.wrangler/' \
--exclude 'worker/' \
--exclude 'node_modules/' \
--exclude 'demo/' \
--exclude 'bun.lock' \
--exclude 'Makefile' \
--exclude '.assetsignore' \
--exclude '.editorconfig' \
--exclude '.gitignore' \
--exclude 'TODO.md' \
--exclude '*.log' \
--exclude '.DS_Store' \
--exclude '**/.DS_Store' \
./ _site/
- name: Verify entrypoint
run: test -f _site/index.html
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site
deploy:
name: Deploy to Pages
needs: build
runs-on: ubuntu-latest
if: vars.DEPLOY_MODE == '' || vars.DEPLOY_MODE == 'pages'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4