chore(showcase): Interaction section, v0.13.0 #10
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: Deploy live showcase to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| # Single in-flight deploy; cancel any earlier in-progress run for the same ref. | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Slint system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libfontconfig1-dev \ | |
| libfreetype6-dev \ | |
| libxkbcommon-dev \ | |
| libgl1-mesa-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: examples/showcase | |
| - name: Install wasm-pack | |
| run: | | |
| if ! command -v wasm-pack >/dev/null 2>&1; then | |
| curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| fi | |
| - name: Build WASM bundle | |
| working-directory: examples/showcase | |
| run: | | |
| wasm-pack build \ | |
| --release \ | |
| --target web \ | |
| --out-dir ../../web/pkg \ | |
| --out-name slintcn-showcase | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: web/ | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |