[cd] Fix website deploy (#1248) #370
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
name: Website | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10.0.0 | |
- name: pnpm install | |
run: pnpm install --frozen-lockfile | |
- name: Generate Static Site | |
run: pnpm ssg | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10.0.0 | |
- name: pnpm install | |
run: pnpm install --frozen-lockfile | |
- name: Cache Cargo | |
uses: Swatinem/rust-cache@v2 | |
with: | |
key: cargo-build-wasm | |
- name: Setup wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Build and Test WASM | |
run: pnpm bw |