-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (42 loc) · 1.45 KB
/
deploy_online_compiler.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
name: Deploy Online-Compiler
# Run this workflow every time a new commit pushed to your repository
on:
push:
branches:
- master
jobs:
build:
name: Build and deploy online compiler
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v2
- name: "Setup rust toolchain"
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
components: rustfmt, clippy
- name: "Install wasm-pack"
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: "Build the compiler"
run: wasm-pack build --target web
- name: "Build the Runtime"
run: cd webml-rt && wasm-pack build --target web
- uses: ZacJW/markdown-html-action@1.1.0
name: "Generate index.html from README.md"
with:
input_files: '[["website/head.html", "README.md", "website/foot.html"]]'
output_files: '["public/index.html"]'
packages: 'pymdown-extensions'
extensions: '["extra", "pymdownx.tasklist"]'
- name: "Prepare for deployment"
run: |
mkdir -p public/compiler
mv pkg/*.{js,ts,wasm} public/compiler/
mv webml-rt/pkg/*.{js,ts,wasm} public/compiler/
- name: "Deploy"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public