generated from emilk/eframe_template
-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.53 KB
/
pages.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
name: Continuous deployment
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
# workflow_run:
# workflows: [Continuous integration]
# types: [completed]
# branches: [main]
jobs:
release:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v2
# Install the stable toolchain for Rust and target WASM
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
# Cache Rust build artifacts
- name: Rust Cache
uses: Swatinem/rust-cache@v1
# Build the WASM with trunk
- name: Build with Trunk
- uses: jetli/trunk-action@v0.1.0
with:
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
- run: trunk build --release --public-url $public_url
env:
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}"
# Use wasm-bindgen to prepare the bindings
- name: Use wasm-bindgen
uses: jetli/wasm-bindgen-action@v0.1.0
# Deploy to GitHub Pages
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
# This option will not maintain any history of your previous pages deployment
# Set to false if you want all page builds to be committed to your gh-pages branch history
single-commit: true