Skip to content

Commit afbe2e3

Browse files
OttoAllmendingerllm-git
andcommitted
feat: add GitHub Pages deployment workflow
Add a new workflow to automatically deploy webui to GitHub Pages when pushing to the gh-pages branch. The workflow utilizes the existing build-and-test workflow with a new flag to upload the webui artifact. Issue: BTC-0 Co-authored-by: llm-git <llm-git@ttll.de>
1 parent 365f620 commit afbe2e3

2 files changed

Lines changed: 47 additions & 0 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
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
jobs:
22+
build:
23+
uses: ./.github/workflows/build-and-test.yaml
24+
with:
25+
upload-webui-artifact: true
26+
27+
deploy:
28+
name: "Deploy"
29+
environment:
30+
name: github-pages
31+
url: ${{ steps.deployment.outputs.page_url }}
32+
runs-on: ubuntu-latest
33+
needs: build
34+
steps:
35+
- name: Deploy to GitHub Pages
36+
id: deployment
37+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)