🚀 github pages #18
Workflow file for this run
This file contains 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: Deploy | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
pages: | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
targets: wasm32-unknown-unknown | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends libasound2-dev libudev-dev | |
cargo install -f wasm-bindgen-cli | |
- name: Build wasm version | |
run: make release-wasm | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: target/web/release | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v2 |