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
10 changes: 3 additions & 7 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy Editor to GitHub Pages
name: Publish Editor to GitHub Pages

on:
push:
Expand Down Expand Up @@ -36,17 +36,13 @@ jobs:

- name: Build editor
working-directory: ./test-harness
run: pnpm exec vite build --base=/backgammon-board/

- name: Add root redirect to editor
run: |
echo '<meta http-equiv="refresh" content="0; url=editor/">' > test-harness/dist/index.html
run: pnpm run build:inline

- uses: actions/configure-pages@v4

- uses: actions/upload-pages-artifact@v3
with:
path: test-harness/dist
path: test-harness/dist-inline

- id: deployment
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
/test-harness/test-results/
/test-harness/playwright-report/
/test-harness/dist/
/test-harness/dist-inline/
/blob-report/
/playwright/.cache/
/dist/
2 changes: 1 addition & 1 deletion test-harness/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const THEME_LABELS: [ThemeKey, string][] = [
["doublingCubeColor", "Doubling Cube"],
];

const DOUBLING_VALUES: DoublingCube["value"][] = [2, 4, 8, 16, 32];
const DOUBLING_VALUES: DoublingCube["value"][] = [2, 4, 8, 16, 32, 64];

// ── Shared UI primitives ────────────────────────────────────────────────────

Expand Down
4 changes: 3 additions & 1 deletion test-harness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
"type": "module",
"scripts": {
"dev": "vite --host",
"build:inline": "vite build --config vite.config.inline.ts",
"e2e": "playwright test",
"e2e:update": "playwright test --update-snapshots"
},
"dependencies": {
"@fontsource/open-sans": "^5.1.1",
"@playwright/test": "^1.49.1",
"vite": "^5.4.10"
"vite": "^5.4.10",
"vite-plugin-singlefile": "^2.1.0"
}
}
71 changes: 71 additions & 0 deletions test-harness/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions test-harness/vite.config.inline.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { viteSingleFile } from "vite-plugin-singlefile";

// Builds the editor as a single self-contained HTML file with all JS/CSS inlined
export default defineConfig({
root: "editor",
plugins: [react(), viteSingleFile()],
build: {
outDir: "../dist-inline",
emptyOutDir: true,
},
});
Loading