CI: deploy to gh-pages (#2)
This commit is contained in:
parent
056471c0eb
commit
0377efebed
9 changed files with 5939 additions and 5 deletions
30
.github/workflows/ci.yml
vendored
30
.github/workflows/ci.yml
vendored
|
@ -10,11 +10,33 @@ env:
|
|||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build
|
||||
run: cargo build --verbose
|
||||
- name: install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- name: check
|
||||
run: cargo check
|
||||
- name: test
|
||||
run: cargo test --verbose
|
||||
run: wasm-pack test --node
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- name: build
|
||||
run: |
|
||||
wasm-pack build
|
||||
cd www
|
||||
npm install
|
||||
npm run build
|
||||
- name: deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: www/dist
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue