-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathamplify.yml
More file actions
40 lines (40 loc) · 1.2 KB
/
amplify.yml
File metadata and controls
40 lines (40 loc) · 1.2 KB
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
version: 1
frontend:
phases:
preBuild:
commands:
- echo "Installing Rust and wasm-pack"
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source $HOME/.cargo/env
- echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> $HOME/.bashrc
- export PATH="$HOME/.cargo/bin:$PATH"
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- rustup target add wasm32-unknown-unknown
- rustup default nightly
- rustc --version
- wasm-pack --version
build:
commands:
- echo "Building WASM package"
- source $HOME/.cargo/env
- export PATH="$HOME/.cargo/bin:$PATH"
- wasm-pack build --target web --out-dir pkg --release
- echo "Build completed successfully"
- ls -la pkg/
postBuild:
commands:
- echo "Preparing deployment files"
- mkdir -p deploy
- cp www/* deploy/
- cp -r pkg deploy/
- ls -la deploy/
- echo "Files prepared for deployment"
artifacts:
baseDirectory: deploy
files:
- "**/*"
cache:
paths:
- $HOME/.cargo/**/*
- target/**/*
- $HOME/.rustup/**/*