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
38 changes: 38 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish the browser demo

on:
workflow_dispatch:

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

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

jobs:
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
- uses: actions/configure-pages@v5
id: pages
- run: npm ci
- run: npm run build -- --base "$PAGES_BASE_PATH/"
env:
PAGES_BASE_PATH: ${{ steps.pages.outputs.base_path }}
- uses: actions/upload-pages-artifact@v3
with:
path: dist
- uses: actions/deploy-pages@v4
id: deployment
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ Open http://127.0.0.1:5173. The app starts in **practice mode**: a built-in play

Your key stays on the local server and never reaches the browser. Don't put keys in variables that start with `VITE_`. Each learning session has a spending limit (`BATCH_BUDGET_USD`, $1 by default), but the costs shown are estimates, not your provider's bill. The example model is a Contributor model, which means Meta may use your prompts and responses for training. The other settings are explained in [.env.example](.env.example).

## Publish a browser demo

GitHub Pages can host the built app in practice mode. Visitors can try the 2048 tutorial, explore the classroom and past results, and run local exams. The site uses browser storage and needs no Meta API key.

After merging the workflow, a repository admin can set **Settings → Pages → Build and deployment → Source** to **GitHub Actions**. Then run **Publish the browser demo** from `main` in the Actions tab. The deploy job links to the published site. Run the workflow again to publish updates.

## The app’s pages

- **Classroom:** run a learning session and watch the students, the teacher and the conversation.
Expand Down
Loading