Skip to content

Commit c66718f

Browse files
authored
infra: merge workflows (#84)
1 parent 3a41efe commit c66718f

File tree

2 files changed

+31
-88
lines changed

2 files changed

+31
-88
lines changed

.github/workflows/devtools-web-simulator-deploy.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.github/workflows/devtools-frontend-lynx-deploy.yml renamed to .github/workflows/gh-deploy.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: Deploy DevTools Frontend (lynx) to Pages and Release
1+
name: Deploy GitHub Pages (Frontend + Simulator)
22

33
on:
44
push:
55
branches: ["main"]
66
paths:
77
- 'packages/devtools-frontend-lynx/**'
8-
- '.github/workflows/devtools-frontend-lynx-deploy.yml'
8+
- 'packages/devtools-web-simulator/**'
9+
- '.github/workflows/gh-deploy.yml'
910
workflow_dispatch:
1011

1112
permissions:
@@ -38,14 +39,22 @@ jobs:
3839
- name: Install dependencies (root)
3940
run: pnpm install
4041

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
4351
52+
# Build DevTools Frontend (lynx)
4453
- name: Build DevTools Frontend (lynx)
4554
run: pnpm run build:devtools-frontend-lynx
4655

47-
- name: Locate artifacts
48-
id: locate
56+
- name: Locate DevTools Frontend artifacts
57+
id: locate_frontend
4958
shell: bash
5059
run: |
5160
set -euo pipefail
@@ -56,16 +65,29 @@ jobs:
5665
echo "Front dir: $FRONT_DIR"
5766
echo "Tarball: $TAR_FILE"
5867
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+
5979
- name: Prepare Pages content
6080
shell: bash
6181
run: |
6282
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
6387
mkdir -p pages-out/devtools-frontend-lynx
64-
# copy all build outputs under timestamped directory
6588
cp -r "$FRONT_DIR"/* pages-out/devtools-frontend-lynx/
66-
# make devtools_app.html the landing page
6789
cp "$FRONT_DIR/devtools_app.html" pages-out/devtools-frontend-lynx/index.html
68-
# Minimal root index page with links
90+
# root index
6991
cat > pages-out/index.html <<'EOF'
7092
<!doctype html>
7193
<html>

0 commit comments

Comments
 (0)