-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (45 loc) · 1.13 KB
/
playground.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
name: playground
on:
workflow_dispatch:
push:
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
crates:
name: publish crates
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: mymindstorm/setup-emsdk@v14
- uses: pnpm/action-setup@v4
with:
version: 8.15.5
- uses: actions/setup-node@v4
with:
node-version: v20.12.2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-emscripten
- name: build wasm
env:
CC: emcc
run: |
make wasm
cp ./target/wasm32-unknown-emscripten/release/loongdoc.* playground/public/
- name: build playground
run: |
cd playground
pnpm install
pnpm build
- name: Publish
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: playground/out
publish_branch: gh-playground
keep_files: true