-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.47 KB
/
Copy pathpages.yml
File metadata and controls
53 lines (49 loc) · 1.47 KB
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
name: Deploy web demo to GitHub Pages
on:
push:
branches: [main]
paths:
- "solid-snake-compiler/**"
- "solid-snake-vm/**"
- "solid-snake-wasm/**"
- "examples/**"
- "tools/**"
- ".github/workflows/pages.yml"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install wasm-bindgen-cli
# The CLI's bindgen schema must exactly match the wasm-bindgen crate the wasm module was
# built against, so read the version from Cargo.lock rather than pinning it here, and the
# two can never drift apart.
run: |
VERSION=$(grep -A1 'name = "wasm-bindgen"' Cargo.lock | grep version | head -1 | cut -d'"' -f2)
echo "wasm-bindgen crate version from Cargo.lock: $VERSION"
cargo install wasm-bindgen-cli --version "$VERSION" --locked
- name: Build web artifacts
run: ./tools/build_web.sh
- uses: actions/upload-pages-artifact@v3
with:
path: solid-snake-wasm/web
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4