-
Notifications
You must be signed in to change notification settings - Fork 0
/
deploy.yaml
87 lines (74 loc) · 2.13 KB
/
deploy.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 18
- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject router.base in your Nuxt configuration file and set
# target to static (https://nuxtjs.org/docs/configuration-glossary/configuration-target/).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: nuxt
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
~/node_modules
~/.pnpm-store
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install pnpm
run: |
npm install -g [email protected]
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build Rust Wasm module
run: |
cargo build --release
cd ./crates/rmonkey_wasm
wasm-pack build
- name: Install dependencies
run: |
pnpm install --frozen-lockfile
- name: Build Nuxt app
env:
NUXT_ENV_TARGET_DIR: dist
run: |
pnpm run generate
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
deploy:
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2