Rebuilt Dev Env prior to refactor and upgrade #155
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 to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Install Rust Nightly and Trunk | |
| run: | | |
| rustup update nightly-2024-06-20 | |
| rustup default nightly-2024-06-20 | |
| rustup target add wasm32-unknown-unknown | |
| cargo install trunk --force | |
| cargo install wasm-bindgen-cli --locked --force | |
| - name: Build the project with Trunk | |
| run: trunk build --release | |
| - name: Build for WebAssembly | |
| run: cargo build --release --target wasm32-unknown-unknown | |
| - name: Run wasm-bindgen to Generate `pkg` Folder | |
| run: wasm-bindgen --out-dir dist/pkg --target web target/wasm32-unknown-unknown/release/yolonode.wasm | |
| - name: Manually Copy Static Files | |
| run: | | |
| mkdir -p dist/static | |
| cp -r static/* dist/static/ | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./dist |