i'm finna be late over this #49
This file contains 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: Continuous deployment | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
# workflow_run: | |
# workflows: [Continuous integration] | |
# types: [completed] | |
# branches: [main] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v2 | |
# Install the stable toolchain for Rust and target WASM | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
# Cache Rust build artifacts | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v1 | |
# Build the WASM with trunk | |
- name: Build with Trunk | |
- uses: jetli/trunk-action@v0.1.0 | |
run: trunk build --release --public-url $public_url | |
env: | |
public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" | |
# Use wasm-bindgen to prepare the bindings | |
- uses: jetli/wasm-bindgen-action@v0.1.0 | |
# Deploy to GitHub Pages | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: dist | |
# This option will not maintain any history of your previous pages deployment | |
# Set to false if you want all page builds to be committed to your gh-pages branch history | |
single-commit: true |