Skip to content

Commit 894ce11

Browse files
OttoAllmendingerllm-git
andcommitted
ci: add GitHub Pages deployment workflow
Adds a new GitHub workflow for automatically deploying the webui to GitHub Pages when changes are pushed to the gh-pages branch. Issue: BTC-0 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 0772f19 commit 894ce11

1 file changed

Lines changed: 93 additions & 0 deletions

File tree

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: "Deploy to GitHub Pages"
2+
3+
on:
4+
push:
5+
branches:
6+
- gh-pages
7+
workflow_dispatch:
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
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+
28+
jobs:
29+
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
82+
83+
deploy:
84+
name: "Deploy"
85+
environment:
86+
name: github-pages
87+
url: ${{ steps.deployment.outputs.page_url }}
88+
runs-on: ubuntu-latest
89+
needs: build
90+
steps:
91+
- name: Deploy to GitHub Pages
92+
id: deployment
93+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)