Skip to content

Continuous deployment #1

Continuous deployment

Continuous deployment #1

# from: https://plippe.github.io/blog/2021/07/12/rust-wasm-github.html
name: Continuous deployment
on:
workflow_run:
branches: [main]
workflows: [Continuous integration]
types: [completed]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- uses: jetli/wasm-pack-action@v0.4.0
- uses: jetli/wasm-bindgen-action@v0.2.0
- uses: actions/checkout@v2
- run: wasm-pack build --target web --release
- uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pkg