Files
ReaderJS/.github/workflows/deploy.yml
T
adminandClaude Opus 4.8 982a85151f refactor: unify on npm dependencies, drop all git submodules
One library-fetching method: everything is an npm dependency, no git
submodules. 'npm install' alone yields a working build.

- foliate-js (e-books) and dejaview (DjVu) aren't published to npm, so they
  are pinned to a commit as git dependencies in package.json (were submodules).
  Imports updated: epub-renderer -> 'foliate-js/view.js'; djvu-renderer worker
  -> node_modules/dejaview.
- vite: optimizeDeps.exclude foliate-js — its stubbed/unused pdf.js uses
  top-level await, which fails esbuild's es2020 prebundle; served as source it
  goes through the existing stubFoliatePdf plugin.
- Removed the 5 reference-only submodules (pdf.js, docx, WebODF, rtf.js,
  marked) — never imported; the runtime uses the npm packages.
- Dropped .gitmodules, submodules/, the monthly update-submodules workflow, the
  deploy checkout's 'submodules: recursive', and the submodules:init script.
  JSDoc's docToText.js stays (already committed under public/jsdoc).
- README: removed the Submodules table; clone no longer needs --recurse-submodules.

Verified: npm ci (fresh-clone sim) + build green; DjVu renders via the
node_modules dejaview worker (dev + build); app boots with foliate loaded.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-25 16:36:50 +02:00

47 lines
806 B
YAML

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:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npx vite build --base /ReaderJS/
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: 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