Skip to content

Commit

Permalink
Actually make the wedding part of the site work correctly and update …
Browse files Browse the repository at this point in the history
…CI and such so it should all just work
  • Loading branch information
itsjunetime committed Jul 22, 2024
1 parent 096ae82 commit 31fa2d6
Show file tree
Hide file tree
Showing 11 changed files with 687 additions and 694 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
Loading

0 comments on commit 31fa2d6

Please sign in to comment.