Fix formatting #45
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: Deploy web page | ||
on: | ||
push: | ||
branches: ["main"] | ||
workflow_dispatch: | ||
env: | ||
CARGO_TERM_COLOR: always | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
jobs: | ||
deploy: | ||
name: Build & Deploy | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
- name: Install wasm-pack | ||
run: | | ||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
rustup target add wasm32-unknown-unknown | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
# Only release if the tests pass | ||
- name: Run tests | ||
run: make precommit | ||
- name: Build web and docs | ||
run: make build-web docs | ||
- name: Copy docs to web | ||
run: cp -r docs examples/web/dist/ | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v2 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'examples/web/dist' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |