-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.24 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Deploy
on:
push:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: dtolnay/rust-toolchain@nightly
with:
targets: wasm32-unknown-unknown
- name: install trunk
run: >
wget -qO- https://github.com/trunk-rs/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
&& sudo mv ./trunk /usr/bin/
- run: cargo generate-lockfile
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
target_ssr/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: trunk build --release
- uses: actions/upload-pages-artifact@v3
with:
path: dist/
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployments.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment