Skip to content

Commit 0c08781

Browse files
committed
deploy: also publish playground at /playground on Pages
Mount the Next.js playground under /truapi/playground/ (basePath) alongside the root explorer and /cargo_doc/, in addition to its existing truapi-playground.dot deployment.
1 parent 5f63802 commit 0c08781

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

.github/workflows/deploy-docs.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ jobs:
4242
- name: Build Rust API docs (HTML)
4343
run: cargo doc -p truapi --no-deps
4444

45+
- name: Install playground dependencies
46+
working-directory: playground
47+
run: yarn install --frozen-lockfile
48+
49+
- name: Build playground (static export)
50+
working-directory: playground
51+
env:
52+
NEXT_PUBLIC_BASE_PATH: /truapi/playground
53+
run: yarn build
54+
4555
- name: Install explorer dependencies
4656
working-directory: explorer
4757
run: npm ci
@@ -62,6 +72,9 @@ jobs:
6272
# Serving a copy of the SPA index lets React Router resolve explorer
6373
# deep links (e.g. /truapi/v/main/method/foo) on a fresh load.
6474
cp site/index.html site/404.html
75+
# Playground mounted at /playground/ (its Next.js basePath).
76+
mkdir -p site/playground
77+
cp -R playground/out/. site/playground/
6578
# truapi crate's cargo doc mounted at /cargo_doc/ with the crate's
6679
# pages flattened (no /truapi/ prefix). rustdoc HTMLs reference
6780
# static.files via `../../../static.files/`, which from

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,4 @@ Alternatively, with a deployed Polkadot Desktop Host installed, navigate to
100100
## Deployment
101101

102102
Pushes to `main` trigger `.github/workflows/deploy-playground.yml`, which builds `playground/` and publishes the static export to `truapi-playground.dot` via `bulletin-deploy`.
103-
Pushes to `main` also trigger `.github/workflows/deploy-docs.yml`, which publishes the explorer (at the Pages root) and the Rust API docs (under `/cargo_doc/`) to GitHub Pages.
103+
Pushes to `main` also trigger `.github/workflows/deploy-docs.yml`, which publishes the explorer (at the Pages root), the playground (under `/playground/`), and the Rust API docs (under `/cargo_doc/`) to GitHub Pages.

0 commit comments

Comments
 (0)