Install wasm-pack using bun because the standard installer script s…
#11
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 GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Install bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install wasm-pack | |
| run: curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Install dependencies and Build | |
| working-directory: ./web | |
| run: | | |
| bun install | |
| bun run build | |
| - name: Build documentation | |
| run: | | |
| cargo doc --no-deps -p mba -p num-bigint | |
| cp -r target/doc ./web/dist/docs | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./web/dist | |
| publish_branch: pages |