✨ minor changes to pipeline #105
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build_and_deploy: | |
name: Rust project | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: jetli/[email protected] | |
with: | |
version: "latest" | |
- run: rustup target add wasm32-unknown-unknown | |
- run: cargo install --locked trunk | |
- run: trunk build --release --public-url /hog-detector | |
- run: cp dist/index.html dist/404.html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: gh-pages | |
publish_dir: ./dist | |
keep_files: true |