移除路由上下文的方式传递应用程序状态,因为会导致界面刷新。 #15
Workflow file for this run
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: 自动发布 | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| deploy_web: | |
| name: 发布Web | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cargo-bins/cargo-binstall@main | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: arduino/setup-protoc@v3 | |
| - name: 安装wasm32-unknown-unknown | |
| run: rustup target install wasm32-unknown-unknown | |
| - name: 安装wasm-pack | |
| run: cargo binstall wasm-pack | |
| - name: 构建network包 | |
| run: cd ./network && wasm-pack build | |
| - name: 安装依赖包 | |
| run: bun install | |
| - name: 构建 | |
| run: bun run build | |
| - name: 发布 | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| wranglerVersion: latest | |
| packageManager: bun | |
| accountId: ${{secrets.CLOUDFLARE_ACCOUNT_ID}} | |
| apiToken: ${{secrets.CLOUDFLARE_API_TOKEN}} |