Skip to content
Merged
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
56 changes: 56 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy to GitHub Pages

# The new (post-rewrite) site has no build step. The repo carries
# index.html and src/ directly, plus a pre-built CodeMirror bundle in
# src/vendor/. Deployment is just "stage those files and upload them" —
# no Node setup, no npm install, no bundler.

on:
push:
branches: [ "main" ]
workflow_dispatch:

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

# One deploy at a time, queued. Don't cancel an in-flight deploy because
# we want production runs to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Stage only the files that should be publicly served. Excludes
# package.json, scripts/, test/, planning docs, mockup.html, etc.
#
# IMPORTANT: `src/` is the deploy boundary. Anything committed under
# that path is published to GitHub Pages on the next main-branch
# push. Do not commit secrets, scratch queries, fixtures, or local
# mocks to `src/`. If you need a file that shouldn't ship, put it
# somewhere else (e.g. `scripts/`, `test/`, or a tracked-but-ignored
# path outside `src/`).
- name: Stage site
run: |
mkdir _site
cp index.html _site/
cp -r src _site/

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: _site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

# Runs the node:test suite on every push to main/develop and on every
# pull request. The suite has zero dependencies (node:test is built into
# Node 20), so there is no `npm install` step — checkout, set up Node,
# run the tests.

on:
push:
branches: [ "main", "develop" ]
pull_request:

# One test run at a time per ref. Rapid pushes to the same PR branch
# cancel the previous in-flight run so we only pay for the latest commit.
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Run tests
run: npm test
69 changes: 0 additions & 69 deletions .github/workflows/vite.yml

This file was deleted.

Loading
Loading