Update github.yml #205
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 client to github pages | |
| on: | |
| push: | |
| branches: ["🐱"] | |
| paths: | |
| - "**" | |
| - ".github/workflows/github.yml" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build-and-deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Rust with WASM | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| target: wasm32-unknown-unknown | |
| - name: Cache Cargo registry and build outputs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install Trunk | |
| uses: jetli/[email protected] | |
| - name: Build | |
| run: cargo build --target wasm32-unknown-unknown --release | |
| - name: Build with Trunk | |
| run: trunk build --release | |
| - name: Setup pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v2 | |
| with: | |
| path: './dist' | |
| name: paula | |
| - name: Deploy to pages | |
| id: deployment | |
| uses: actions/deploy-pages@v3 |