Skip to content

Commit c27764e

Browse files
committed
Merge branch 'sandbox-deploy'
2 parents c35310c + fe2ee7e commit c27764e

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.github/workflows/deploy-sandbox.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Build and Deploy Sandbox to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Rust
17+
uses: dtolnay/rust-toolchain@stable
18+
19+
- name: Install wasm-pack, clang, and jq
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y clang jq
23+
cargo install --force wasm-pack
24+
25+
- name: Build WASM
26+
run: |
27+
make wasm
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v3
31+
with:
32+
node-version: '18'
33+
34+
- name: Install Sandbox Dependencies and Build Sandbox
35+
run: |
36+
make build-sandbox
37+
38+
- name: Deploy to GitHub Pages
39+
uses: JamesIves/github-pages-deploy-action@v4
40+
with:
41+
branch: gh-pages
42+
folder: sandbox/dist
43+
token: ${{ secrets.GITHUB_TOKEN }}

sandbox/vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ import topLevelAwait from "vite-plugin-top-level-await";
66
// https://vitejs.dev/config/
77
export default defineConfig({
88
plugins: [react(), wasm(), topLevelAwait()],
9-
})
9+
base: '/bitbox-api-rs/'
10+
})

0 commit comments

Comments
 (0)