better dir structure, all examples up to date #129
This file contains hidden or 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
on: | |
push: | |
branches: ["master"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π | |
uses: actions/checkout@v3 | |
- name: π | |
uses: shalzz/zola-deploy-action@v0.17.2 | |
env: | |
BUILD_DIR: '.' | |
BUILD_ONLY: true | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- uses: actions-rs/cargo@v1 | |
with: | |
use-cross: true | |
command: build | |
args: --release --target=wasm32-unknown-unknown --examples | |
- name: π | |
run: cargo install -f wasm-bindgen-cli --version 0.2.87 | |
- name: π | |
run: | | |
for example in examples/*.rs; do | |
example_name=$(basename "$example" .rs) | |
wasm-bindgen "target/wasm32-unknown-unknown/release/examples/${example_name}.wasm" --out-dir public --target web | |
done | |
- name: π | |
uses: actions/configure-pages@v2 | |
- name: π | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './public' | |
- name: π | |
uses: actions/deploy-pages@v1 |