Skip to content

deploy

deploy #1

Workflow file for this run

on: [workflow_dispatch]
name: deploy
jobs:
deploy:
name: Build and publish to GitHub pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: jetli/[email protected]
with:
version: 'latest'
- name: Build bundle
run: |
rm -rf dist/
wasm-pack build --release --target web
mkdir dist
cp -r html dist
# The generated WebAssembly
cp -r pkg dist
find dist -type d -print0 | xargs -0 chmod 755
find dist -type f -print0 | xargs -0 chmod 644
- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist