Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/deploy-pwa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ on:
description: Exact oneworks-ai/app commit SHA to build. Overrides source_ref.
required: false
type: string
dry_run:
description: Build and validate without updating the gh-pages branch.
required: false
default: false
type: boolean

permissions:
contents: write
Expand Down Expand Up @@ -51,6 +56,9 @@ jobs:
fetch-depth: 1
path: app

- name: Checkout Avatar SDK source
run: git -C app submodule update --init --depth 1 -- assets/avatar

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
Expand All @@ -74,12 +82,14 @@ jobs:
__ONEWORKS_PROJECT_CLIENT_MODE__: standalone

- name: Checkout pages branch
if: ${{ github.event_name != 'workflow_dispatch' || !inputs.dry_run }}
uses: actions/checkout@v4
with:
ref: gh-pages
path: pages

- name: Publish gh-pages branch
if: ${{ github.event_name != 'workflow_dispatch' || !inputs.dry_run }}
env:
SOURCE_REF: ${{ steps.source.outputs.ref }}
run: |
Expand Down
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## Deployment

- `deploy-pwa.yml` checks out `oneworks-ai/app`, builds `apps/client` with `__ONEWORKS_PROJECT_CLIENT_BASE__=/pwa/`, and deploys the generated static files to GitHub Pages.
- `deploy-pwa.yml` checks out `oneworks-ai/app`, initializes the required `assets/avatar` SDK submodule before workspace install, builds `apps/client` with `__ONEWORKS_PROJECT_CLIENT_BASE__=/pwa/`, and deploys the generated static files to GitHub Pages.
- For cross-repository validation before a source PR merges, dispatch the workflow with the exact `source_sha` and `dry_run=true`; this exercises checkout, submodule initialization, install, and production build without updating `gh-pages`.
- Keep `__ONEWORKS_PROJECT_CLIENT_HOMEPAGE_PREVIEW__=1`; the homepage iframe depends on the preview runtime being present in the official PWA build.
- Keep `404.html` as a copy of `index.html` so GitHub Pages can serve React Router routes such as `/pwa/session/...` and `/pwa/rooms/...`.
Loading