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
4 changes: 3 additions & 1 deletion CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ License / Contributing` (enforced by Baton's compliance check). Do **not** add a
| `package.json` | `scenerystack ^3`, `vite ^8`, `typescript ^7`, `@biomejs/biome ^2.5`, `vitest ^4`; standard `scripts` block |
| `.githooks/{pre-commit,pre-push}` | present; activated via `prepare` script on `npm install` |
| `.github/workflows/ci.yml` | calls `OpenPhysics/Baton` reusable CI + shared security workflows |
| `.github/dependabot.yml` | present |
| `.github/workflows/deploy.yml` | calls `OpenPhysics/Baton` reusable Pages deploy; `on: push` to `main` **and** `workflow_dispatch` |
| `.github/dependabot.yml` | present (synced from `Baton/config/dependabot-npm.yml`) |

**PWA** (`vite-plugin-pwa`) is fleet-standard. Copy the template's `VitePWA({…})` block, `scripts/generate-icons.ts`, and `index.html` meta; only `id` / `name` / `short_name` / `description` / `theme_color` / screenshot `label` change per sim.

Expand Down Expand Up @@ -218,6 +219,7 @@ rest are a quick manual scan.
- [ ] `tests/memory-leak.test.ts` exists and `vitest.config.ts` enables `--expose-gc`. *(auto)*
- [ ] `*KeyboardHelpContent.ts` exists under `src/` (Keyboard Shortcuts dialog). *(auto)*
- [ ] `.githooks/{pre-commit,pre-push}` present; `prepare` sets `core.hooksPath`. *(auto)*
- [ ] `.github/workflows/deploy.yml` calls Baton's reusable Pages deploy and allows `workflow_dispatch`. *(auto)*
- [ ] PWA: `VitePWA` manifest has `id`, `categories`, `display_override`, screenshots, no `orientation`; `public/icons/` + `public/screenshots/{wide,narrow}.png` exist; `index.html` has theme-color + OG/Twitter. *(auto)*
- [ ] `doc/model.md` + `doc/implementation-notes.md` exist and are filled. *(auto presence; manual content)*
- [ ] `README.md` follows the six-section outline; no local `CONTRIBUTING.md` / `LICENSE`. *(auto)*
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,18 @@ Optional compliance checking:
flag needed. Pass `run-tests: "true"` to force it on (e.g. before a test script exists) or
`run-tests: "false"` to opt out.

Pages deploy (sims that publish to GitHub Pages):
Pages deploy (sims that publish to GitHub Pages). Callers use `push` to `main` **and**
`workflow_dispatch`, so a site can be published without waiting for a push (same pair of
triggers as this repo's [`pages.yml`](.github/workflows/pages.yml)):

```yaml
name: Deploy

on:
push:
branches: [main]
workflow_dispatch:

jobs:
deploy:
uses: OpenPhysics/Baton/.github/workflows/deploy.yml@main
Expand All @@ -120,7 +129,8 @@ unless marked *(warn)*):
Stack → License → Contributing**).
- **CI wiring** — `.github/workflows/ci.yml` calls this repo's reusable `ci.yml` plus
[`shared-dependency-review.yml`](.github/workflows/shared-dependency-review.yml) and
[`shared-codeql.yml`](.github/workflows/shared-codeql.yml); `.github/dependabot.yml` present.
[`shared-codeql.yml`](.github/workflows/shared-codeql.yml); `.github/workflows/deploy.yml`
calls the reusable Pages deploy and allows `workflow_dispatch`; `.github/dependabot.yml` present.
- **Node pins** — `engines.node` is `>=24` and `@types/node` major is `24` (matching the fleet Node
version); a `.nvmrc` / `.node-version`, if present, agrees.
- **SceneryStack structure** (sims only) — the five-file bootstrap chain with `main.ts` importing
Expand Down
2 changes: 1 addition & 1 deletion doc/add-simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ npm run check

Then confirm:
- `.github/workflows/ci.yml` calls `OpenPhysics/Baton/.../ci.yml@main`
- `.github/workflows/deploy.yml` (or equivalent) calls Baton's reusable Pages deploy
- `.github/workflows/deploy.yml` (or equivalent) calls Baton's reusable Pages deploy and allows `workflow_dispatch`
- README follows the six-section outline (enforced by compliance — see
[`CONVENTIONS.md`](../CONVENTIONS.md))

Expand Down
12 changes: 12 additions & 0 deletions scripts/check-repo-compliance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,18 @@ if [ -f package.json ] && [ -f src/main.ts ]; then
fi
[ "$hooks_ok" -eq 1 ] && pass ".githooks/ pre-commit + pre-push with prepare activation"

# Pages deploy (CONVENTIONS.md §7): reusable Baton workflow + manual dispatch,
# matching Baton's own pages.yml triggers so a missed push can be recovered.
if [ ! -f .github/workflows/deploy.yml ]; then
fail ".github/workflows/deploy.yml is missing"
elif ! grep -q "OpenPhysics/Baton/.github/workflows/deploy.yml@main" .github/workflows/deploy.yml; then
fail "deploy.yml must call OpenPhysics/Baton reusable deploy workflow"
elif ! grep -q "workflow_dispatch:" .github/workflows/deploy.yml; then
fail "deploy.yml must allow workflow_dispatch (manual Pages publish)"
else
pass "deploy.yml uses shared reusable workflow with workflow_dispatch"
fi

# PWA (CONVENTIONS.md §7): vite-plugin-pwa + generate-icons + public assets + index meta.
if ! grep -q '"vite-plugin-pwa"' package.json; then
fail "package.json is missing vite-plugin-pwa"
Expand Down