name: Pages
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v7
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Build wasm
run: wasm-pack build --release --target web
working-directory: web
- name: Stage static site
run: |
cd web
mkdir _site
cp -r index.html app.js worker.js style.css pkg _site/
- uses: actions/upload-pages-artifact@v5
with:
path: web/_site
- id: deployment
uses: actions/deploy-pages@v5