Skip to content

Commit cc0cac8

Browse files
OttoAllmendingerllm-git
andcommitted
feat: add webui artifact upload for GitHub Pages deployment
Modify build workflow to allow uploading webui dist folder as a GitHub Pages artifact. Update the pages deployment workflow to reuse the main build process instead of duplicating build steps. Issue: BTC-0 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 894ce11 commit cc0cac8

2 files changed

Lines changed: 13 additions & 59 deletions

File tree

.github/workflows/build-and-test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
description: "Upload build artifacts"
88
type: boolean
99
default: false
10+
upload-webui-artifact:
11+
description: "Upload webui build artifact for pages deployment"
12+
type: boolean
13+
default: false
1014

1115
env:
1216
RUST_TOOLCHAIN: nightly-2025-10-23
@@ -90,6 +94,12 @@ jobs:
9094
packages/wasm-solana/js/wasm/
9195
retention-days: 1
9296

97+
- name: Upload webui artifact
98+
if: inputs.upload-webui-artifact
99+
uses: actions/upload-pages-artifact@v3
100+
with:
101+
path: packages/webui/dist
102+
93103
test:
94104
name: "Test ${{ matrix.package }}"
95105
needs: build

.github/workflows/deploy-pages.yaml

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,67 +18,11 @@ concurrency:
1818
group: "pages"
1919
cancel-in-progress: false
2020

21-
env:
22-
RUST_TOOLCHAIN: nightly-2025-10-23
23-
NODE_VERSION: 20
24-
NPM_VERSION: 11.5.1
25-
WASM_PACK_VERSION: 0.13.1
26-
WASM_OPT_VERSION: 0.116.1
27-
2821
jobs:
2922
build:
30-
name: "Build"
31-
runs-on: ubuntu-latest
32-
steps:
33-
- uses: actions/checkout@v4
34-
35-
- name: Install Rust
36-
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1
37-
with:
38-
toolchain: ${{ env.RUST_TOOLCHAIN }}
39-
components: rustfmt, clippy
40-
41-
- name: Cache Rust dependencies
42-
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # v2.8.1
43-
with:
44-
workspaces: |
45-
packages/wasm-utxo
46-
packages/wasm-bip32
47-
packages/wasm-solana
48-
cache-on-failure: true
49-
50-
- name: Setup Node
51-
uses: actions/setup-node@v4
52-
with:
53-
node-version: ${{ env.NODE_VERSION }}
54-
55-
- name: Install npm and wasm tools
56-
run: |
57-
npm install -g npm@${{ env.NPM_VERSION }}
58-
cargo install wasm-pack --version ${{ env.WASM_PACK_VERSION }}
59-
cargo install wasm-opt --version ${{ env.WASM_OPT_VERSION }}
60-
61-
- name: Build Info
62-
run: |
63-
echo "node $(node --version)"
64-
echo "npm $(npm --version)"
65-
echo "rustc $(rustc --version)"
66-
echo "wasm-pack $(wasm-pack --version)"
67-
echo "wasm-opt $(wasm-opt --version)"
68-
69-
- name: Install Packages
70-
run: npm ci --workspaces --include-workspace-root
71-
72-
- name: Build packages
73-
run: npm --workspaces run build
74-
75-
- name: Setup Pages
76-
uses: actions/configure-pages@v5
77-
78-
- name: Upload Pages artifact
79-
uses: actions/upload-pages-artifact@v3
80-
with:
81-
path: packages/webui/dist
23+
uses: ./.github/workflows/build-and-test.yaml
24+
with:
25+
upload-webui-artifact: true
8226

8327
deploy:
8428
name: "Deploy"

0 commit comments

Comments
 (0)