Skip to content

Deploy Github Page

Deploy Github Page #25

name: Deploy Github Page
on:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
rustup target install wasm32-unknown-unknown
cargo install wasm-bindgen-cli
- name: Build
run: |
cargo build --profile wasm-release --target wasm32-unknown-unknown
wasm-bindgen --no-typescript --target web --out-dir ./dist/tetris --out-name "tetris" ./target/wasm32-unknown-unknown/wasm-release/tetris.wasm
- name: Copy Assets
run: |
cp -r ./assets ./dist/assets
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
branch: gh-pages