unitdc-rs/.github/workflows/web.yml
eternal-flame-AD 8eba95fa0c
update workflow dependencies
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-07-26 15:57:52 -05:00

42 lines
No EOL
867 B
YAML

name: Web
on:
workflow_run:
workflows: ["Rust Check"]
types:
- completed
branches:
- main
permissions:
contents: write
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: |
yarn global add 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