deploy-github-page #271
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-github-page | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libs | |
run: sudo apt-get update; sudo apt-get install --no-install-recommends g++ pkg-config libx11-dev libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev libssl-dev | |
if: runner.os == 'linux' | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
target: wasm32-unknown-unknown | |
- name: Install trunk | |
uses: jetli/[email protected] | |
with: | |
version: 'latest' | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: whist-browser | |
- name: Build Release | |
run: | | |
trunk build --release --public-url "${GITHUB_REPOSITORY#*/}" | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: dist |