Merge pull request #11 from Rigidity/field-guards #32
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: Publish to GitHub pages | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
Github-Pages-Release: | |
timeout-minutes: 10 | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Install cargo-binstall | |
uses: cargo-bins/cargo-binstall@main | |
- name: Add WASM target | |
run: rustup target add wasm32-unknown-unknown | |
- name: Clippy | |
run: cargo clippy -p rue-web | |
- name: Fmt | |
run: cargo fmt -p rue-web -- --files-with-diff --check | |
- name: Install Trunk binary | |
run: cargo binstall trunk --no-confirm | |
- name: Build with Trunk | |
run: | | |
cd crates/rue-web | |
trunk build --release | |
- name: Setup GitHub Pages | |
uses: actions/configure-pages@v4 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
path: "./crates/rue-web/dist" | |
- name: Deploy to GitHub Pages 🚀 | |
id: deployment | |
uses: actions/deploy-pages@v3 |