mirror of
https://github.com/eternal-flame-AD/unitdc-rs.git
synced 2025-02-17 10:17:28 -06:00
add web deployment action
This commit is contained in:
parent
d3d2327112
commit
df0b953df4
1 changed files with 37 additions and 0 deletions
37
.github/workflows/web.yml
vendored
Normal file
37
.github/workflows/web.yml
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
name: Web
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
env:
|
||||||
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup Node.js environment
|
||||||
|
uses: actions/setup-node@v3.7.0
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
cargo test --verbose
|
||||||
|
- name: Install wasm-pack
|
||||||
|
run: |
|
||||||
|
cargo install wasm-pack
|
||||||
|
- name: Build wasm
|
||||||
|
run: |
|
||||||
|
cd crates/unitdc-web && wasm-pack build --target web
|
||||||
|
- name: Build UI
|
||||||
|
run: |
|
||||||
|
cd crates/unitdc-web/ui && yarn && yarn build
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: ./crates/unitdc-web/ui/dist
|
Loading…
Add table
Reference in a new issue