Skip to content

Commit 3ec133e

Browse files
committed
doc: update GitHub Pages builder to build and serve react ui under /.../viewer
Signed-off-by: Nick Mitchell <[email protected]>
1 parent 7924a23 commit 3ec133e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/mkdocs-gh-pages.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
paths:
1010
- "mkdocs.yml"
1111
- "docs/**"
12-
- "pdl-live"
12+
- "pdl-live-react"
1313

1414
# Allows you to run this workflow manually from the Actions tab
1515
workflow_dispatch:
@@ -46,6 +46,20 @@ jobs:
4646
run: mkdocs build --config-file ./mkdocs.yml --strict --site-dir ./_site
4747
env:
4848
CI: true
49+
# Viewer
50+
- name: Set up node
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: 22
54+
- name: Install dependencies
55+
working-directory: ./pdl-live-react
56+
run: npm ci
57+
- name: Build viewer
58+
working-directory: ./pdl-live-react
59+
run: npm run build
60+
- name: Copy viewer
61+
working-directory: ./pdl-live-react
62+
run: cp -a ./dist ../docs/viewer
4963
# Deploy
5064
- name: Upload artifact
5165
uses: actions/upload-pages-artifact@v3

pdl-live-react/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const host = process.env.TAURI_DEV_HOST;
66

77
// https://vitejs.dev/config/
88
export default defineConfig(async () => ({
9+
base: "./",
910
plugins: [
1011
react(),
1112
checker({

0 commit comments

Comments
 (0)