-
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (41 loc) · 1.13 KB
/
page.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: deploy-github-page
on:
push:
branches: [main]
permissions:
contents: write
jobs:
build-web:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev
- name: Install trunk
uses: jetli/[email protected]
with:
version: 'latest'
- name: Add wasm target
run: |
rustup target add wasm32-unknown-unknown
- name: Build Release
working-directory: ./web
run: |
trunk build --release=true
- name: optimize Wasm
uses: NiklasEi/wasm-opt-action@v2
with:
file: web/dist/*.wasm
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: web/dist