Merge pull request #27 from itsscb/feature

feat: performance and workflow tweaks
This commit is contained in:
itsscb 2024-09-03 14:00:04 +02:00 committed by GitHub
commit 4fb197e9ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 22 additions and 8 deletions

View File

@ -14,23 +14,31 @@ jobs:
- name: checkout
uses: actions/checkout@v4
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: cache trunk
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/trunk
~/.cache/trunk/
key: ${{ runner.os }}-cargo-${{ hashFiles('~/.cargo/bin/trunk') }}
restore-keys: ${{ runner.os }}-trunk
- name: cache dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/
~/.cargo/bin/
~/.cache/trunk/
target/
node_modules/
key: ${{ runner.os }}-cargo-${{ hashFiles('./Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-wordl
- name: install rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: add rust target wasm32-unknown-unknown
run: rustup target add wasm32-unknown-unknown

View File

@ -20,3 +20,8 @@ gloo-net = "0.6.0"
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.127"
rand = "0.8.5"
[profile.release]
opt-level = "z"
lto = true
strip = true

View File

@ -50,6 +50,7 @@
}
</style>
<link data-trunk href="./public/styles.css" rel="css">
<!-- <link data-trunk href="./public/styles.css" rel="css"> -->
<link data-trunk rel="copy-file" href="public/robots.txt" data-target-path="/" />
<!-- <link data-trunk href="./assets/favicon.ico" rel="icon" type="image/x-icon"> -->
<link data-trunk rel="copy-dir" href="public">

View File

@ -363,7 +363,7 @@ pub fn Home() -> Html {
"flex-col",
"items-center",
"justify-center",
"h-[90vh]",
if *loading { "h-[90vh]" } else { "" },
)
}
>