Skip to content

Add a check for rustfmt on build #9

Add a check for rustfmt on build

Add a check for rustfmt on build #9

Workflow file for this run

name: Build and Deploy with Trunk
on: [push]
jobs:
build:
name: Rust project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
override: true
components: rustfmt, clippy
- uses: jetli/[email protected]
- uses: jetli/[email protected]
- run: cargo fmt --all -- --check
- name: Build Static Site with Trunk
run: trunk build --release
- name: Upload static files as an artifact
uses: actions/upload-pages-artifact@v3
with:
path: dist/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
steps:
- name: Deploy Pages site from build
id: deployment
uses: actions/deploy-pages@v4