diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 00000000..fa43b9c9 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,92 @@ +name: Deploy Pages + +# Builds the app-web Adwaita SPA (`gjsify build --app browser`) and deploys it to +# GitHub Pages — the successor to the legacy Jekyll build of the classic tutorial +# (removed in the app-web rewrite). Point Settings → Pages → Source at +# "GitHub Actions" for this workflow to serve the site. + +on: + push: + branches: [main] + paths: + - "packages/app-web/**" + - "packages/learn/**" + - "packages/common-ui/**" + - "packages/core/**" + - "packages/examples/**" + - "gjsify-lock.json" + - ".github/workflows/deploy-pages.yml" + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment; don't cancel an in-progress publish. +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + name: Build web app + runs-on: ubuntu-latest + # `gjsify build`/`gjsify tsc` spawn `gjs` (unavailable on ubuntu-latest), so + # build in a Fedora 43 container (GJS 1.86 / SpiderMonkey 140) — the same + # environment as the CI type-check job. + container: + image: fedora:43 + steps: + - name: Install container prerequisites (incl. gjs) + run: dnf install -y git tar xz findutils gjs + + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: "24" + + - name: Cache gjsify tarball store + uses: actions/cache@v4 + with: + path: ~/.cache/gjsify/tarballs + key: gjsify-tarballs-${{ hashFiles('gjsify-lock.json') }} + restore-keys: gjsify-tarballs- + + - name: Install gjsify CLI + run: npm install -g @gjsify/cli@^0.8.0 + + - name: Install dependencies + run: gjsify install --immutable + + # app-web imports `@learn6502/learn/dist/tutorial.html` (and the examples' + # `.asm`), so the workspace deps that publish built output must be built + # first — the same set the CI type-check job builds. + - name: Build workspace dependencies + run: | + gjsify workspace @learn6502/core build + gjsify workspace @learn6502/examples build + gjsify workspace @learn6502/learn build + + - name: Build web app + run: gjsify workspace @learn6502/app-web build:app + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: packages/app-web/dist-app + + deploy: + name: Deploy to GitHub Pages + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/AGENTS.md b/AGENTS.md index 35bdf254..774dccc9 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -310,8 +310,12 @@ Required for R8/ProGuard code shrinking. Missing entries cause **runtime crashes Applies to all files in `packages/app-web/`. -Web app version. Stack: TypeScript + HTML + CSS + Vite + Jekyll (static site generation). -Focus: browser compatibility, responsive design, leverage `6502` core + `common-ui`. +Web app version. An Adwaita single-page app on `@gjsify/adwaita-web`, sharing the +`common-ui` controllers + `core` with app-gnome (the four views are the web twins +of the GNOME views). Production build = `gjsify build --app browser` (→ `dist-app/`, +deployed to GitHub Pages); dev = Vite + HMR (`vite.app.config.ts`). The classic +skilldrick Jekyll tutorial was removed in the app-web rewrite. +Focus: browser compatibility, responsive design, leverage `core` + `common-ui`. ## Translations diff --git a/packages/app-web/.gitignore b/packages/app-web/.gitignore index 05f2afbc..91ebf928 100644 --- a/packages/app-web/.gitignore +++ b/packages/app-web/.gitignore @@ -1,3 +1 @@ -_site -dist dist-app diff --git a/packages/app-web/Gemfile b/packages/app-web/Gemfile deleted file mode 100644 index d2851ce0..00000000 --- a/packages/app-web/Gemfile +++ /dev/null @@ -1,2 +0,0 @@ -source "https://rubygems.org" -gem "github-pages", group: :jekyll_plugins \ No newline at end of file diff --git a/packages/app-web/Gemfile.lock b/packages/app-web/Gemfile.lock deleted file mode 100644 index f85c415c..00000000 --- a/packages/app-web/Gemfile.lock +++ /dev/null @@ -1,320 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - activesupport (8.0.2) - base64 - benchmark (>= 0.3) - bigdecimal - concurrent-ruby (~> 1.0, >= 1.3.1) - connection_pool (>= 2.2.5) - drb - i18n (>= 1.6, < 2) - logger (>= 1.4.2) - minitest (>= 5.1) - securerandom (>= 0.3) - tzinfo (~> 2.0, >= 2.0.5) - uri (>= 0.13.1) - addressable (2.8.7) - public_suffix (>= 2.0.2, < 7.0) - base64 (0.2.0) - benchmark (0.4.0) - bigdecimal (3.1.9) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) - colorator (1.1.0) - commonmarker (0.23.11) - concurrent-ruby (1.3.5) - connection_pool (2.5.3) - csv (3.3.4) - dnsruby (1.72.4) - base64 (~> 0.2.0) - logger (~> 1.6.5) - simpleidn (~> 0.2.1) - drb (2.2.1) - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) - ethon (0.16.0) - ffi (>= 1.15.0) - eventmachine (1.2.7) - execjs (2.10.0) - faraday (2.13.1) - faraday-net_http (>= 2.0, < 3.5) - json - logger - faraday-net_http (3.4.0) - net-http (>= 0.5.0) - ffi (1.17.2-aarch64-linux-gnu) - ffi (1.17.2-aarch64-linux-musl) - ffi (1.17.2-arm-linux-gnu) - ffi (1.17.2-arm-linux-musl) - ffi (1.17.2-arm64-darwin) - ffi (1.17.2-x86-linux-gnu) - ffi (1.17.2-x86-linux-musl) - ffi (1.17.2-x86_64-darwin) - ffi (1.17.2-x86_64-linux-gnu) - ffi (1.17.2-x86_64-linux-musl) - forwardable-extended (2.6.0) - gemoji (4.1.0) - github-pages (232) - github-pages-health-check (= 1.18.2) - jekyll (= 3.10.0) - jekyll-avatar (= 0.8.0) - jekyll-coffeescript (= 1.2.2) - jekyll-commonmark-ghpages (= 0.5.1) - jekyll-default-layout (= 0.1.5) - jekyll-feed (= 0.17.0) - jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.16.1) - jekyll-include-cache (= 0.2.1) - jekyll-mentions (= 1.6.0) - jekyll-optional-front-matter (= 0.3.2) - jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.3.0) - jekyll-redirect-from (= 0.16.0) - jekyll-relative-links (= 0.6.1) - jekyll-remote-theme (= 0.4.3) - jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.8.0) - jekyll-sitemap (= 1.4.0) - jekyll-swiss (= 1.0.0) - jekyll-theme-architect (= 0.2.0) - jekyll-theme-cayman (= 0.2.0) - jekyll-theme-dinky (= 0.2.0) - jekyll-theme-hacker (= 0.2.0) - jekyll-theme-leap-day (= 0.2.0) - jekyll-theme-merlot (= 0.2.0) - jekyll-theme-midnight (= 0.2.0) - jekyll-theme-minimal (= 0.2.0) - jekyll-theme-modernist (= 0.2.0) - jekyll-theme-primer (= 0.6.0) - jekyll-theme-slate (= 0.2.0) - jekyll-theme-tactile (= 0.2.0) - jekyll-theme-time-machine (= 0.2.0) - jekyll-titles-from-headings (= 0.5.3) - jemoji (= 0.13.0) - kramdown (= 2.4.0) - kramdown-parser-gfm (= 1.1.0) - liquid (= 4.0.4) - mercenary (~> 0.3) - minima (= 2.5.1) - nokogiri (>= 1.16.2, < 2.0) - rouge (= 3.30.0) - terminal-table (~> 1.4) - webrick (~> 1.8) - github-pages-health-check (1.18.2) - addressable (~> 2.3) - dnsruby (~> 1.60) - octokit (>= 4, < 8) - public_suffix (>= 3.0, < 6.0) - typhoeus (~> 1.3) - html-pipeline (2.14.3) - activesupport (>= 2) - nokogiri (>= 1.4) - http_parser.rb (0.8.0) - i18n (1.14.7) - concurrent-ruby (~> 1.0) - jekyll (3.10.0) - addressable (~> 2.4) - colorator (~> 1.0) - csv (~> 3.0) - em-websocket (~> 0.5) - i18n (>= 0.7, < 2) - jekyll-sass-converter (~> 1.0) - jekyll-watch (~> 2.0) - kramdown (>= 1.17, < 3) - liquid (~> 4.0) - mercenary (~> 0.3.3) - pathutil (~> 0.9) - rouge (>= 1.7, < 4) - safe_yaml (~> 1.0) - webrick (>= 1.0) - jekyll-avatar (0.8.0) - jekyll (>= 3.0, < 5.0) - jekyll-coffeescript (1.2.2) - coffee-script (~> 2.2) - coffee-script-source (~> 1.12) - jekyll-commonmark (1.4.0) - commonmarker (~> 0.22) - jekyll-commonmark-ghpages (0.5.1) - commonmarker (>= 0.23.7, < 1.1.0) - jekyll (>= 3.9, < 4.0) - jekyll-commonmark (~> 1.4.0) - rouge (>= 2.0, < 5.0) - jekyll-default-layout (0.1.5) - jekyll (>= 3.0, < 5.0) - jekyll-feed (0.17.0) - jekyll (>= 3.7, < 5.0) - jekyll-gist (1.5.0) - octokit (~> 4.2) - jekyll-github-metadata (2.16.1) - jekyll (>= 3.4, < 5.0) - octokit (>= 4, < 7, != 4.4.0) - jekyll-include-cache (0.2.1) - jekyll (>= 3.7, < 5.0) - jekyll-mentions (1.6.0) - html-pipeline (~> 2.3) - jekyll (>= 3.7, < 5.0) - jekyll-optional-front-matter (0.3.2) - jekyll (>= 3.0, < 5.0) - jekyll-paginate (1.1.0) - jekyll-readme-index (0.3.0) - jekyll (>= 3.0, < 5.0) - jekyll-redirect-from (0.16.0) - jekyll (>= 3.3, < 5.0) - jekyll-relative-links (0.6.1) - jekyll (>= 3.3, < 5.0) - jekyll-remote-theme (0.4.3) - addressable (~> 2.0) - jekyll (>= 3.5, < 5.0) - jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) - rubyzip (>= 1.3.0, < 3.0) - jekyll-sass-converter (1.5.2) - sass (~> 3.4) - jekyll-seo-tag (2.8.0) - jekyll (>= 3.8, < 5.0) - jekyll-sitemap (1.4.0) - jekyll (>= 3.7, < 5.0) - jekyll-swiss (1.0.0) - jekyll-theme-architect (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-cayman (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-dinky (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-leap-day (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-merlot (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-midnight (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-minimal (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-modernist (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.6.0) - jekyll (> 3.5, < 5.0) - jekyll-github-metadata (~> 2.9) - jekyll-seo-tag (~> 2.0) - jekyll-theme-slate (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-tactile (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-theme-time-machine (0.2.0) - jekyll (> 3.5, < 5.0) - jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.3) - jekyll (>= 3.3, < 5.0) - jekyll-watch (2.2.1) - listen (~> 3.0) - jemoji (0.13.0) - gemoji (>= 3, < 5) - html-pipeline (~> 2.2) - jekyll (>= 3.0, < 5.0) - json (2.11.3) - kramdown (2.4.0) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - liquid (4.0.4) - listen (3.9.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) - logger (1.6.6) - mercenary (0.3.6) - mini_portile2 (2.8.8) - minima (2.5.1) - jekyll (>= 3.5, < 5.0) - jekyll-feed (~> 0.9) - jekyll-seo-tag (~> 2.1) - minitest (5.25.5) - net-http (0.6.0) - uri - nokogiri (1.18.8) - mini_portile2 (~> 2.8.2) - racc (~> 1.4) - nokogiri (1.18.8-aarch64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-aarch64-linux-musl) - racc (~> 1.4) - nokogiri (1.18.8-arm-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-arm-linux-musl) - racc (~> 1.4) - nokogiri (1.18.8-arm64-darwin) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-darwin) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-gnu) - racc (~> 1.4) - nokogiri (1.18.8-x86_64-linux-musl) - racc (~> 1.4) - octokit (4.25.1) - faraday (>= 1, < 3) - sawyer (~> 0.9) - pathutil (0.16.2) - forwardable-extended (~> 2.6) - public_suffix (5.1.1) - racc (1.8.1) - rb-fsevent (0.11.2) - rb-inotify (0.11.1) - ffi (~> 1.0) - rexml (3.4.1) - rouge (3.30.0) - rubyzip (2.4.1) - safe_yaml (1.0.5) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.9.2) - addressable (>= 2.3.5) - faraday (>= 0.17.3, < 3) - securerandom (0.4.1) - simpleidn (0.2.3) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) - typhoeus (1.4.1) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - unicode-display_width (1.8.0) - uri (1.0.3) - webrick (1.9.1) - -PLATFORMS - aarch64-linux - aarch64-linux-gnu - aarch64-linux-musl - arm-linux - arm-linux-gnu - arm-linux-musl - arm64-darwin - x86-linux - x86-linux-gnu - x86-linux-musl - x86_64-darwin - x86_64-linux-gnu - x86_64-linux-musl - -DEPENDENCIES - github-pages - -BUNDLED WITH - 2.5.17 diff --git a/packages/app-web/README.md b/packages/app-web/README.md index cd81a325..62361bbc 100644 --- a/packages/app-web/README.md +++ b/packages/app-web/README.md @@ -1,28 +1,34 @@ -# Easy6502 Web App +# Learn 6502 Assembly — Web App [](https://creativecommons.org/licenses/by/4.0/) -This package contains the classic web version of Easy6502 by Nick Morgan, a one-stop accessible tutorial on 6502 assembly language programming. It includes a series of worked example programs which you can edit and run in the embedded simulator. +The web version of [Learn 6502 Assembly](../../README.md), built as an Adwaita +single-page app on [`@gjsify/adwaita-web`](https://www.npmjs.com/package/@gjsify/adwaita-web). +It looks and behaves like the native GNOME desktop app (`../app-gnome`), sharing +the same `@learn6502/common-ui` controllers and `@learn6502/core` assembler / +simulator — the four views (Learn, Editor, Debugger, Game Console) are the web +twins of the GNOME views. -This web version is maintained as part of the larger [Learn 6502 Assembly](../../README.md) project, which also provides a modern GNOME desktop application. While the GNOME app offers an enhanced experience, we maintain this web version to preserve the original tutorial's accessibility and simplicity. - -The original version can still be found at http://skilldrick.github.io/easy6502/. +The original skilldrick tutorial can still be found at +http://skilldrick.github.io/easy6502/. ## Development -### Installation +```bash +gjsify install +gjsify run dev:app # Vite dev server with HMR +``` -To run the web version locally, execute the following commands: +Production build (what the GitHub Pages deploy runs): -``` - gjsify install - gjsify run setup - gjsify run build - gjsify run start +```bash +gjsify run build:app # → dist-app/{index.html,app.js} (gjsify build --app browser) +gjsify run preview:app # preview the built output ``` -This will serve the site at http://localhost:4000. +Type-check: `gjsify run check`. ## License -This package is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/), maintaining the original license from Nick Morgan's work. +Licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/), +maintaining the original license from Nick Morgan's work. diff --git a/packages/app-web/_config.yml b/packages/app-web/_config.yml deleted file mode 100644 index d156409e..00000000 --- a/packages/app-web/_config.yml +++ /dev/null @@ -1,4 +0,0 @@ -safe: true -lsi: false -markdown: kramdown -highlighter: rouge diff --git a/packages/app-web/_includes/end.html b/packages/app-web/_includes/end.html deleted file mode 100644 index cf041b3a..00000000 --- a/packages/app-web/_includes/end.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -