1
- name : Deploy DevTools Frontend (lynx) to Pages and Release
1
+ name : Deploy GitHub Pages (Frontend + Simulator)
2
2
3
3
on :
4
4
push :
5
5
branches : ["main"]
6
6
paths :
7
7
- ' packages/devtools-frontend-lynx/**'
8
- - ' .github/workflows/devtools-frontend-lynx-deploy.yml'
8
+ - ' packages/devtools-web-simulator/**'
9
+ - ' .github/workflows/gh-deploy.yml'
9
10
workflow_dispatch :
10
11
11
12
permissions :
@@ -38,14 +39,22 @@ jobs:
38
39
- name : Install dependencies (root)
39
40
run : pnpm install
40
41
41
- - name : ln Python
42
- run : ln -s `which python3` /usr/local/bin/python
42
+ - name : Ensure python (user bin)
43
+ shell : bash
44
+ run : |
45
+ set -euo pipefail
46
+ mkdir -p "$HOME/.local/bin"
47
+ PY3=$(which python3)
48
+ ln -sf "$PY3" "$HOME/.local/bin/python"
49
+ echo "$HOME/.local/bin" >> $GITHUB_PATH
50
+ python --version
43
51
52
+ # Build DevTools Frontend (lynx)
44
53
- name : Build DevTools Frontend (lynx)
45
54
run : pnpm run build:devtools-frontend-lynx
46
55
47
- - name : Locate artifacts
48
- id : locate
56
+ - name : Locate DevTools Frontend artifacts
57
+ id : locate_frontend
49
58
shell : bash
50
59
run : |
51
60
set -euo pipefail
@@ -56,16 +65,29 @@ jobs:
56
65
echo "Front dir: $FRONT_DIR"
57
66
echo "Tarball: $TAR_FILE"
58
67
68
+ # Build DevTools Web Simulator (rsbuild)
69
+ - name : Install deps (simulator)
70
+ working-directory : packages/devtools-web-simulator
71
+ run : npm install
72
+
73
+ - name : Build Simulator
74
+ working-directory : packages/devtools-web-simulator
75
+ env :
76
+ ASSET_PREFIX : /${{ github.event.repository.name }}/devtools-web-simulator/
77
+ run : npm run build
78
+
59
79
- name : Prepare Pages content
60
80
shell : bash
61
81
run : |
62
82
set -euo pipefail
83
+ # simulator
84
+ mkdir -p pages-out/devtools-web-simulator
85
+ cp -r packages/devtools-web-simulator/dist/* pages-out/devtools-web-simulator/
86
+ # frontend
63
87
mkdir -p pages-out/devtools-frontend-lynx
64
- # copy all build outputs under timestamped directory
65
88
cp -r "$FRONT_DIR"/* pages-out/devtools-frontend-lynx/
66
- # make devtools_app.html the landing page
67
89
cp "$FRONT_DIR/devtools_app.html" pages-out/devtools-frontend-lynx/index.html
68
- # Minimal root index page with links
90
+ # root index
69
91
cat > pages-out/index.html <<'EOF'
70
92
<!doctype html>
71
93
<html>
0 commit comments