Deploy svg2gcode-web #125
This file contains hidden or 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@v5 | |
| with: | |
| submodules: 'true' | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| - uses: jetli/trunk-action@v0.5.1 | |
| with: | |
| version: v0.21.14 | |
| - name: Trunk build | |
| run: | | |
| cd web | |
| trunk build --release --public-url https://sameer.github.io/svg2gcode/ | |
| - name: Publish to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: github.ref == 'refs/heads/main' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ${{ github.workspace }}/web/dist |