feat(web): show site and app version in the footer (#8) #6
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 to Cloudflare Pages | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: pages-deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| deployments: write | |
| jobs: | |
| deploy: | |
| name: Build WASM and deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - name: Cache cargo registry and target | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Install wasm-opt (binaryen) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y binaryen | |
| - name: Build optimised WASM into web/ | |
| run: ./scripts/build_wasm.bash | |
| - name: Publish to Cloudflare Pages | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy web --project-name=long-multiplication-calculator --branch=main --commit-dirty=true | |
| gitHubToken: ${{ secrets.GITHUB_TOKEN }} |