-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (43 loc) · 1.25 KB
/
publish.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
name: Publish
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- uses: oven-sh/setup-bun@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown
override: true
- name: Setup rust cache
uses: Swatinem/rust-cache@v1
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Install NodeJS
uses: actions/setup-node@v2
with:
node-version: '16.x'
- name: Install dependencies
run: bun install
- name: Install binaryen
run: sudo apt install binaryen
- name: "TEMP: wasm-opt 0.11 fix"
run: sudo mkdir -p /usr/bin/bin && sudo ln -s /usr/bin/wasm-opt /usr/bin/bin/wasm-opt
- name: Build wasm
run: bun run wasm
- name: Build app
run: bun run build
- name: Set CNAME
run: echo 'ever.bytie.moe' > ./dist/CNAME
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist