ci: gh-pages action
This commit is contained in:
parent
af7c305c9e
commit
977e8d134b
2 changed files with 22 additions and 34 deletions
22
.github/workflows/gh-pages.yml
vendored
Normal file
22
.github/workflows/gh-pages.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: Github Pages
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Install
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Build
|
||||
run: wasm-pack build -t web -d ./wasm/dist --out-name orgize ./wasm/
|
||||
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./wasm
|
||||
34
.github/workflows/wasm.yml
vendored
34
.github/workflows/wasm.yml
vendored
|
|
@ -1,34 +0,0 @@
|
|||
name: Wasm
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: wasm
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: "14"
|
||||
|
||||
- name: Install
|
||||
run: |
|
||||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
yarn
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
wasm-pack build --target web --out-dir wasm/pkg -- --features wasm
|
||||
yarn build
|
||||
|
||||
- name: Deploy to gh pages
|
||||
uses: JamesIves/github-pages-deploy-action@4.1.5
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: wasm/lib
|
||||
Loading…
Add table
Add a link
Reference in a new issue