Skip to content

Commit

Permalink
Merge branch 'sandbox-deploy'
Browse files Browse the repository at this point in the history
  • Loading branch information
shonsirsha committed Feb 6, 2024
2 parents c35310c + fe2ee7e commit c27764e
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/deploy-sandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Deploy Sandbox to GitHub Pages

on:
push:
branches:
- master

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Rust
uses: dtolnay/rust-toolchain@stable

- name: Install wasm-pack, clang, and jq
run: |
sudo apt-get update
sudo apt-get install -y clang jq
cargo install --force wasm-pack
- name: Build WASM
run: |
make wasm
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'

- name: Install Sandbox Dependencies and Build Sandbox
run: |
make build-sandbox
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: sandbox/dist
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion sandbox/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ import topLevelAwait from "vite-plugin-top-level-await";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react(), wasm(), topLevelAwait()],
})
base: '/bitbox-api-rs/'
})

0 comments on commit c27764e

Please sign in to comment.