Add support for layer/path metadata inheritance #470
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: Wasm CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - release/* | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: moonrepo/setup-rust@v1 | |
| with: | |
| targets: wasm32-unknown-unknown | |
| components: clippy | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just | |
| - run: just clippy-wasm | |
| check-generated: | |
| name: "check generated code" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: cargo build -p whiskers-gallery | |
| - run: git diff --exit-code crates/whiskers-gallery/src/generated.rs | |
| check-thumbnails: | |
| name: "check thumbnails" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: moonrepo/setup-rust@v1 | |
| - run: cargo run --bin generate-thumbnails | |
| - run: git diff --exit-code crates/whiskers-gallery/web/thumbnails/ | |
| build-wasm: | |
| name: "build gallery wasm" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: moonrepo/setup-rust@v1 | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just | |
| - uses: jetli/[email protected] | |
| with: | |
| version: 0.2.100 | |
| - run: just gallery-wasm | |
| - name: Upload wasm artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wasm-sketches | |
| path: crates/whiskers-gallery/web/sketches/ | |
| deploy: | |
| name: "deploy to GitHub Pages" | |
| if: github.ref == 'refs/heads/master' && github.event_name == 'push' | |
| needs: [clippy, check-generated, check-thumbnails, build-wasm] | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Download wasm artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: wasm-sketches | |
| path: crates/whiskers-gallery/web/sketches/ | |
| - name: Optimize WASM | |
| uses: NiklasEi/wasm-opt-action@v2 | |
| with: | |
| file: crates/whiskers-gallery/web/sketches/whiskers_gallery_bg.wasm | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - uses: taiki-e/install-action@v2 | |
| with: | |
| tool: just | |
| - name: Build HTML | |
| run: just gallery-html | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v3 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: "crates/whiskers-gallery/web" | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |