deploy: backed editor at editor.pcbjam.com (remote mode, same CDN WASM)
New release.yml job `deploy-editor` (parallel to deploy-demo, same per-tag WASM manifest): builds the standalone in REMOTE mode via the new scripts/deploy/build-editor.mjs — projects/libs/auth from the closed API (VITE_API_BASE_URL=https://api.pcbjam.com, VITE_LIBS_SOURCE=synced), Yjs board rooms through the API host's path route (VITE_YJS_ENDPOINT=api origin, doc source ydoc) — and ships it to the pcbjam-editor Pages project. The demo deploy is unchanged. The closed stack itself (api./app.pcbjam.com) deploys from pcbjam-private; when both sides change, that repo tags first. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014dasZuqo6FStgT3rkC85im
This commit is contained in:
parent
574284c486
commit
a0df92bfd1
2 changed files with 201 additions and 0 deletions
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
|
|
@ -35,6 +35,11 @@ env:
|
|||
LIB_TAG: "10.0.3"
|
||||
PAGES_PROJECT: pcbjam-demo
|
||||
PAGES_PROD_BRANCH: production
|
||||
# Backed editor deployment (remote mode against the closed API). The closed
|
||||
# stack (api./app.pcbjam.com) deploys from the pcbjam-private repo; release
|
||||
# order when both change: pcbjam-private first, then this repo.
|
||||
EDITOR_PAGES_PROJECT: pcbjam-editor
|
||||
EDITOR_API_BASE: https://api.pcbjam.com
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
WRANGLER_CMD: npx --yes wrangler@4
|
||||
|
|
@ -133,3 +138,47 @@ jobs:
|
|||
--project-name "$PAGES_PROJECT"
|
||||
--branch "$PAGES_PROD_BRANCH"
|
||||
--commit-dirty=true
|
||||
|
||||
# 4) Backed editor (editor.pcbjam.com): the SAME standalone, built in remote
|
||||
# mode against the closed API (pcbjam-private's api.pcbjam.com) instead of
|
||||
# the static gallery. Reuses this tag's CDN WASM manifest — no extra WASM
|
||||
# work. Runs in parallel with deploy-demo (separate runner, own dist/).
|
||||
deploy-editor:
|
||||
needs: [meta, publish-wasm]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
RELEASE_TAG: ${{ needs.meta.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: false
|
||||
- name: Init pcbjam-shared submodule
|
||||
run: git submodule update --init --depth 1 web/pcbjam-shared
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10.33.0
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
cache-dependency-path: web/pnpm-lock.yaml
|
||||
- name: Install standalone workspace
|
||||
run: pnpm --dir web install --frozen-lockfile
|
||||
|
||||
- name: Build editor (remote mode)
|
||||
run: >
|
||||
node scripts/deploy/build-editor.mjs --tag "$RELEASE_TAG"
|
||||
--cdn "$CDN" --api-base "$EDITOR_API_BASE"
|
||||
|
||||
- name: Ensure Pages project exists
|
||||
run: >
|
||||
npx --yes wrangler@4 pages project create "$EDITOR_PAGES_PROJECT"
|
||||
--production-branch "$PAGES_PROD_BRANCH"
|
||||
|| echo "pages project create skipped (already exists)"
|
||||
|
||||
- name: Deploy to Cloudflare Pages
|
||||
run: >
|
||||
npx --yes wrangler@4 pages deploy web/standalone/dist
|
||||
--project-name "$EDITOR_PAGES_PROJECT"
|
||||
--branch "$PAGES_PROD_BRANCH"
|
||||
--commit-dirty=true
|
||||
|
|
|
|||
Loading…
Reference in a new issue