ci fix 3 #18
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| prefix-key: "${{ runner.os }}" | |
| shared-key: "wasm" | |
| cache-all-crates: true | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: nightly-2025-06-30 | |
| default: true | |
| override: true | |
| - name: Install wasm-pack via apt | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Build | |
| run: | | |
| apt install -y sccache | |
| cd crates/fluidsim | |
| wasm-pack build --target web --release --locked | |
| mv pkg ../.. | |
| cd ../.. | |
| - name: Move files around | |
| run: | | |
| mkdir dist | |
| rm pkg/.gitignore | |
| mv pkg dist/ | |
| mv index.html dist/ | |
| echo fluidsim.angad.page > dist/CNAME | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist |