feat: code #170
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: Dioxus Deploy | |
| on: | |
| push: | |
| branches: | |
| - main # 或者你希望触发部署的其他分支 | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Rust toolchain | |
| uses: actions-rs/[email protected] | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| target: wasm32-unknown-unknown | |
| override: true | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Dioxus-CLI | |
| shell: bash | |
| run: cargo install dioxus-cli --version 0.4.3 | |
| - name: Build Project 🎁 | |
| shell: bash | |
| run: | | |
| cd karaty | |
| dx build --release | |
| cp ./dist/index.html ./dist/404.html | |
| - name: Deploy Project 🚀 | |
| uses: JamesIves/[email protected] | |
| with: | |
| branch: gh-pages | |
| folder: ./karaty/dist | |
| clean: false |