-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actually make the wedding part of the site work correctly and update …
…CI and such so it should all just work
- Loading branch information
1 parent
096ae82
commit 31fa2d6
Showing
11 changed files
with
687 additions
and
694 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,17 @@ jobs: | |
with: | ||
version: 'latest' | ||
- name: Install wasm-opt | ||
run: "curl -L -o binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_117/binaryen-version_117-x86_64-linux.tar.gz && tar -xzvf ./binaryen.tar.gz" | ||
run: "curl -L -o binaryen.tar.gz https://github.com/WebAssembly/binaryen/releases/download/version_118/binaryen-version_118-x86_64-linux.tar.gz && tar -xzvf ./binaryen.tar.gz" | ||
- name: Install cargo-leptos | ||
run: curl --proto '=https' --tlsv1.2 -LsSf https://leptos-rs.artifacts.axodotdev.host/cargo-leptos/v0.2.17/cargo-leptos-installer.sh | sh | ||
- name: Build backend | ||
run: cargo build --profile production --bin backend | ||
run: cargo leptos build --release | ||
- name: Optimise backend wasm | ||
run: "./binaryen-version_118/bin/wasm-opt -Oz -o target/site/pkg/backend.wasm target/site/pkg/backend.wasm" | ||
- name: Build frontend | ||
run: "cd frontend && trunk build --release" | ||
- name: Optimise wasm | ||
run: "cd frontend/dist && ../../binaryen-version_117/bin/wasm-opt -Oz -o opt.wasm $(ls frontend*.wasm) && mv ./opt.wasm $(ls frontend*.wasm)" | ||
run: "cd frontend/dist && ../../binaryen-version_118/bin/wasm-opt -Oz -o $(ls frontend*.wasm) $(ls frontend*.wasm)" | ||
- name: Stop currently-running backend | ||
uses: appleboy/[email protected] | ||
with: | ||
|
@@ -47,7 +51,7 @@ jobs: | |
host: ${{ secrets.SERVER_HOST }} | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
key: ${{ secrets.SERVER_SSH_KEY }} | ||
source: "target/production/backend,frontend/dist/*" | ||
source: "target/production/backend,frontend/dist/*,target/site/pkg/*" | ||
target: /home/junkie/server_files/ | ||
strip_components: 2 | ||
overwrite: true | ||
|
Oops, something went wrong.