Skip to content

Fix simple clippy lint warnings using cargo clippy --fix && cargo fmt #53

Fix simple clippy lint warnings using cargo clippy --fix && cargo fmt

Fix simple clippy lint warnings using cargo clippy --fix && cargo fmt #53

Workflow file for this run

name: Deploy the latest documentation and WASM app to GitHub Pages
on:
push:
branches: [ master ]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Prepare a staging directory
run: mkdir dist
- name: Build documentation
run: cargo doc --no-deps --release
- name: Stage documentation
run: mv target/doc dist/api
- name: Install trunk
run: wget -qO- https://github.com/thedodd/trunk/releases/download/v0.16.0/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: Build WASM
run: ../trunk build --public-url /rrr-rs/app/ --release
working-directory: ./web
- name: Stage WASM
run: mv web/dist dist/app
- name: Fix file permissions
shell: sh
run: |
chmod -c -R +rX dist |
while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./dist
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1