Deploy svg2gcode-web #85
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: [main] | |
workflows: [Check 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@v4 | |
with: | |
submodules: 'true' | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: wasm32-unknown-unknown | |
- uses: Swatinem/rust-cache@v2 | |
- uses: jetli/[email protected] | |
with: | |
version: v0.18.8 | |
- 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/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{ github.workspace }}/web/dist |