🔧 Prune licenses #33
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: Demo | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build Demo | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure GitHub Pages | |
id: configure | |
uses: actions/configure-pages@v5 | |
- run: rustup target add wasm32-unknown-unknown | |
- uses: cargo-bins/cargo-binstall@main | |
- run: cargo binstall --no-confirm trunk | |
- run: trunk build --public-url '${{ steps.configure.outputs.base_url }}' | |
working-directory: demo | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: demo/dist | |
pages: | |
name: Deploy to GitHub Pages | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
if: format('refs/heads/{0}', github.event.repository.default_branch) == github.ref | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |