CI: deploy to gh-pages (#2)

This commit is contained in:
Matthew Ryan Dillon 2020-09-25 10:29:27 -07:00 committed by GitHub
parent 056471c0eb
commit 0377efebed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 5939 additions and 5 deletions

View file

@ -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