diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..76d0286 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,43 @@ +name: Deploy Education to GitHub Pages + +on: + push: + branches: + - main + paths: + - 'education/**' + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments 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 + + - name: Setup Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: 'education' + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 6ffe0e7..0d8f17f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ The project is organized as a Cargo workspace with multiple crates: - `toppy-gw`: A lightweight QUIC + HTTP/3 gateway (QUIC ping + CONNECT-UDP echo/forward). - `toppy-core`: Shared functionality, including configuration management, policy enforcement, and logging. - `toppy-proto`: Definitions of the custom capsule/command messages used between client and gateway. +- `education`: Educational materials and quizzes (deployed to [GitHub Pages](https://thinksyncs.github.io/toppy/)). See `spec.md` for a usage-oriented spec, and `TODO.md` / `bd` for backlog tracking. diff --git a/education/README.md b/education/README.md new file mode 100644 index 0000000..c4bbb39 --- /dev/null +++ b/education/README.md @@ -0,0 +1,38 @@ +# Toppy Education + +This directory contains educational materials for understanding Toppy, QUIC, HTTP/3, and CONNECT-UDP. + +## Available Resources + +- **quiz_template_skeleton.html** - An interactive bilingual (EN/JP) quiz covering Toppy fundamentals, QUIC, HTTP/3, CONNECT-UDP, and architecture +- **quiz.css** - Styles for the quiz with light/dark theme support + +## GitHub Pages Deployment + +These HTML files are automatically deployed to GitHub Pages when changes are pushed to the `main` branch. + +Access the quiz at: `https://thinksyncs.github.io/toppy/quiz_template_skeleton.html` + +## Local Development + +To test the quiz locally: + +1. Open `quiz_template_skeleton.html` in your web browser +2. The quiz works entirely client-side with no build step required + +## Requirements + +The GitHub Pages deployment is configured in `.github/workflows/deploy-pages.yml` and requires: + +- GitHub Pages enabled in repository settings +- Pages configured to deploy from GitHub Actions (not branch) +- Workflow permissions set to allow deployments + +## Setup GitHub Pages + +To enable GitHub Pages for this repository: + +1. Go to repository Settings → Pages +2. Under "Build and deployment": + - Source: Select "GitHub Actions" +3. The workflow will automatically deploy on push to `main` branch or manual trigger