Deploy svg2gcode-web #59
Workflow file for this run
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 svg2gcode-web | |
on: | |
workflow_run: | |
branches: [master] | |
workflows: [Build svg2gcode-web] | |
types: [completed] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}-web-deploy | |
- uses: jetli/[email protected] | |
- uses: jetli/[email protected] | |
- name: Trunk build | |
run: | | |
cd web | |
trunk build --release --public-url svg2gcode | |
- name: Publish to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./web/dist |