diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..8c95119 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,60 @@ +# Publishes the browser-only demo to GitHub Pages: https://duartesantos8.github.io/openGym/ +# +# Pages serves static files only, so this build has no backend β VITE_DEMO=1 makes the app +# boot straight into guest mode with a seeded example history (see frontend/src/lib/demo.js). +# The exercise images/GIFs (~140 MB) are never committed here; the demo build points at the +# upstream dataset on jsDelivr instead, pinned to a commit so the CDN can cache it forever. +name: Deploy demo to GitHub Pages + +on: + push: + branches: [main] + paths: + - 'frontend/**' + - '.github/workflows/pages.yml' + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +env: + DATASET: https://cdn.jsdelivr.net/gh/hasaneyldrm/exercises-dataset@7455efae41b330c265e7cd4b78dfa848e7ce5ebd + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + cache-dependency-path: frontend/package-lock.json + - run: npm ci + working-directory: frontend + - run: npm run build + working-directory: frontend + env: + VITE_DEMO: '1' + VITE_IMG_BASE: ${{ env.DATASET }}/images/ + VITE_GIF_BASE: ${{ env.DATASET }}/videos/ + - uses: actions/configure-pages@v5 + - uses: actions/upload-pages-artifact@v3 + with: + path: frontend/dist + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deploy.outputs.page_url }} + steps: + - id: deploy + uses: actions/deploy-pages@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index d1ab267..e3d69eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## Unreleased + +- βΆοΈ **Live demo** at [duartesantos8.github.io/openGym](https://duartesantos8.github.io/openGym/) β + a browser-only build (`VITE_DEMO=1`) published to GitHub Pages on every push to `main`. It boots + into guest mode with a seeded example profile (12 weeks of Push/Pull/Legs, weigh-ins, PRs) so + every screen has something to show, and it never talks to a server. Passkeys, sync and the admin + dashboard stay exclusive to self-hosted instances, which is where the backend lives. +- πΌοΈ Builds can point the exercise media elsewhere via `VITE_IMG_BASE` / `VITE_GIF_BASE` β the demo + serves the ~140 MB dataset from a CDN instead of shipping it. The default (`img/` and `gif/` next + to the app) is unchanged. + ## v1.2.0 β 2026-07-23 A complete visual redesign. Same app, same data β every screen redrawn. diff --git a/README.md b/README.md index 12182b0..bc3a395 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,16 @@ No account on someone else's server, no subscription, no ads. Just `docker compo +
{t('Guest mode β data lives only in this browser.')}
} + {!user && !DEMO &&{t('Guest mode β data lives only in this browser.')}
} {/* ---------- appearance ---------- */} -