-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (45 loc) · 1.25 KB
/
publish-web.yaml
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
54
55
56
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
name: Publish the web app on GitHub Pages
jobs:
publish:
name: Publish
runs-on: ubuntu-20.04
steps:
- name: Checkout the code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install Node
uses: actions/[email protected]
with:
node-version: "18"
- name: Install Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
rustup target add wasm32-unknown-unknown
- name: Setup Rust build cache
uses: Swatinem/rust-cache@v2
- name: Install Node dependencies
run: npm ci
working-directory: web
- name: Build the app
run: npm run build
working-directory: web
- name: Deploy to GitHub Pages
uses: peaceiris/[email protected]
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./web/dist
force_orphan: true