ci: gh-pages action

This commit is contained in:
PoiScript 2023-11-13 16:42:37 +08:00
parent af7c305c9e
commit 977e8d134b
No known key found for this signature in database
GPG key ID: 22C2B1249D99985E
2 changed files with 22 additions and 34 deletions

22
.github/workflows/gh-pages.yml vendored Normal file
View 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

View file

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