-
-
Notifications
You must be signed in to change notification settings - Fork 51
44 lines (39 loc) · 1.11 KB
/
web-deploy.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 svg2gcode-web
on:
workflow_run:
branches: [master]
workflows: [Build svg2gcode-web]
types: [completed]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-web-deploy
- uses: jetli/[email protected]
- uses: jetli/[email protected]
- name: Trunk build
run: |
cd web
trunk build --release --public-url svg2gcode
- name: Publish to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./web/dist