Add touch event support to mouse device (#126) #14
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
| name: Build and deploy documentation and demonstration to Github Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup | Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup | Enable cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: "Documentation" | |
| - name: Setup | Install GCC multilib | |
| run: sudo apt update && sudo apt install -y gcc-multilib | |
| - name: Setup | Rust stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown, wasm32-wasip1 | |
| - name: Setup | Rust nightly toolchain | |
| uses: dtolnay/rust-toolchain@nightly | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Setup | Cargo binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Setup | Cargo make | |
| run: cargo binstall cargo-make --no-confirm --force | |
| - name: Setup | Trunk | |
| run: cargo binstall trunk --no-confirm --force | |
| - name: Build | Documentation (Host) | |
| run: | | |
| cargo make doc-host | |
| mkdir -p ./pages/host/ | |
| cp ./documentation/index.html ./pages/host/ | |
| cp -r ./target/x86_64-unknown-linux-gnu/doc/* ./pages/host/ | |
| - name: Build | Documentation (WASM) | |
| run: | | |
| cargo make doc-wasm | |
| mkdir -p ./pages/wasm/ | |
| cp ./documentation/index.html ./pages/wasm | |
| cp -r ./target/wasm32-unknown-unknown/doc/* ./pages/wasm/ | |
| - name: Build | WASM demonstration | |
| working-directory: ./examples/wasm | |
| run: | | |
| trunk build --release --public-url ./ | |
| mkdir -p ../../pages/demonstrations/wasm/ | |
| cp -r ./dist/* ../../pages/demonstrations/wasm/ | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./pages | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |