← back to code directory

GitHub Pages

How all the sites under johnesco.github.io are set up

Overview

All GitHub Pages sites share a single GitHub account (Johnesco). There are two deployment patterns:

PatternHow it worksDeploy trigger
Direct Entire repo is the site. Push to main and GitHub serves it. git push
Actions Only the web/ subdirectory is deployed via a GitHub Actions workflow. git push triggers .github/workflows/deploy-pages.yml

All Sites

URLRepoLocal pathDeployWhat it is
johnesco.github.io Johnesco.github.io C:\code\Johnesco.github.io\ Direct Landing page, portfolio hub, small apps
/zork1/ zork1 C:\code\i7\zork1\ Actions Zork I — Inform 7 Edition (4 versions)
/dracula/ dracula C:\code\i7\dracula\ Actions Dracula — Inform 7 game
/RNG/ RNG C:\code\i7\RNG\ Actions RNG — Inform 7 practice game

How It Works

User site (Direct deploy)

The Johnesco.github.io repo is a special GitHub user pages repository. Everything in the repo root is served directly at https://johnesco.github.io/. No build step, no workflow — just push and it's live.

C:\code\Johnesco.github.io\ ├── index.html → johnesco.github.io/ ├── github/index.html → johnesco.github.io/github/ (this page) ├── edu/sql/index.html → johnesco.github.io/edu/sql/ ├── games/blackout/ → johnesco.github.io/games/blackout/ ├── resume_archive/ → johnesco.github.io/resume_archive/ └── ... every file is served as-is

Project sites (Actions deploy)

The Inform 7 game repos contain source code, tests, and build artifacts that should NOT be published. Only the web/ subdirectory gets deployed. A GitHub Actions workflow handles this:

C:\code\i7\zork1\ (same pattern for dracula, RNG) ├── story.ni ← source (not deployed) ├── tests/ ← test infra (not deployed) ├── .github/workflows/ │ └── deploy-pages.yml ← deploys web/ on push to main └── web/ ← THIS is what gets published ├── play.html → johnesco.github.io/zork1/play.html └── lib/parchment/ → JS interpreter + base64 game binary

The deploy workflow

All three Inform 7 projects use the same workflow file:

name: Deploy to GitHub Pages

on:
  push:
    branches: [main]
  workflow_dispatch:

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

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

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/configure-pages@v5
      - uses: actions/upload-pages-artifact@v3
        with:
          path: web
      - id: deployment
        uses: actions/deploy-pages@v4

The key line is path: web — only the web/ directory becomes the site root.

Adding a New Project Site

To publish a new Inform 7 game (or any project) at johnesco.github.io/<name>/:

  1. Create the repo on GitHub: gh repo create Johnesco/<name> --public --source=.
  2. Copy the workflow above into .github/workflows/deploy-pages.yml
  3. Put your site content in a web/ directory
  4. Enable Pages: gh api repos/Johnesco/<name>/pages -X POST -f build_type=workflow
  5. Push to main — the workflow deploys automatically
For Inform 7 games: use the centralized setup script at C:\code\i7\inform7\tools\web\setup-web.sh to bootstrap the web/ directory with Parchment libraries and the base64-encoded game binary.

How the Parchment Web Player Works

Inform 7 compiles to a .ulx (Glulx) binary. To play in a browser:

  1. The .ulx file is base64-encoded and wrapped as JSONP: processBase64Zcode('...')
  2. main.js (Parchment loader) fetches this file via JSONP
  3. Parchment decodes the base64 back to binary
  4. The Quixe or Glulxe JS engine runs the binary in the browser

Seven library files are required in web/lib/parchment/:

FileRole
jquery.min.jsDOM library
main.jsParchment game loader
main.cssLayout styling
parchment.cssEngine styling
parchment.jsEngine variant
quixe.jsJS Glulx interpreter (loaded at runtime)
glulxe.jsWASM Glulx interpreter (loaded at runtime)
Common pitfall: If quixe.js or glulxe.js is missing, the page loads fine but then fails with "Error loading engine: 404". These engine files are fetched asynchronously by main.js, so the error only appears after the page renders. Always copy all seven files.