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
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches: [main]
pull_request:

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

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: pnpm typecheck

- run: pnpm test

- run: pnpm build

- name: Install Playwright browsers
run: pnpm --filter @vicoding/web exec playwright install --with-deps chromium

- name: Run e2e tests
run: pnpm --filter @vicoding/web e2e

- name: Upload Playwright report
if: failure()
uses: actions/upload-artifact@v4
with:
name: playwright-report
path: apps/web/playwright-report/
retention-days: 7
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy web app to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

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

concurrency:
group: pages
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile

- name: Build web app
env:
VITE_BASE: /${{ github.event.repository.name }}/
run: pnpm build

- uses: actions/configure-pages@v5

- uses: actions/upload-pages-artifact@v3
with:
path: apps/web/dist

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions apps/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function pyodideAssets(): Plugin {
}

export default defineConfig({
// Set by the GitHub Pages deploy workflow so assets resolve under /<repo>/; "/" for local dev and previews.
base: process.env.VITE_BASE ?? "/",
plugins: [
react(),
pyodideAssets(),
Expand Down
6 changes: 3 additions & 3 deletions docs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ What's **not** done:
The goal of v0 is a **go / adjust / stop decision** from a playtest (PRD §4 hypotheses). Everything below serves that, in this order.

### 1. Put it in front of testers
- [ ] **CI:** a GitHub Actions workflow running `pnpm typecheck`, `pnpm test` and the e2e suite on every push. Claude can do this.
- [ ] **Deploy the web build** to a static host (Netlify, Cloudflare Pages, or GitHub Pages via Actions). Claude can write the workflow; the user connects the host.
- [x] **CI:** a GitHub Actions workflow (`.github/workflows/ci.yml`) running `pnpm typecheck`, `pnpm test` and the e2e suite on every push and PR.
- [x] **Deploy the web build** to GitHub Pages (`.github/workflows/deploy.yml`, builds on push to `main`). The user still needs to flip Settings → Pages → Source to "GitHub Actions" once, the first time it runs.
- [ ] **Analytics collector:** a tiny endpoint that stores the JSON batches the app sends (`VITE_ANALYTICS_URL`), e.g. a serverless function. Alternatively, use only the device export in moderated sessions. Claude can write it; the user deploys it.
- [ ] **Native test builds** on the user's Mac and in Android Studio, following [mobile.md](mobile.md). Optional: the web link already works on phones.
- [ ] Walk through the pre-launch checklist in [playtest.md](playtest.md) §5.
Expand All @@ -42,5 +42,5 @@ The goal of v0 is a **go / adjust / stop decision** from a playtest (PRD §4 hyp

## Open questions for the user
1. Tester recruiting channel and incentive (PRD §14).
2. Hosting choice for the web build and the analytics collector.
2. Hosting choice for the analytics collector (the web build now deploys to GitHub Pages).
3. Whether native builds are wanted for the first playtest, or the web link is enough.
Loading