Skip to content

Commit

Permalink
ci: add github action to sync playground
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Dec 31, 2022
1 parent cb67447 commit f2afd08
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/update-playground.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Playground

on:
push:
branches:
- master
paths:
- '**.rs'
workflow_dispatch:

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Build wasm
run: |
cd playground
wasm-pack build --target web
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Build web
run: |
cd www
npm install
npm run build
- name: Publish dist directory
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: playground/www/dist

0 comments on commit f2afd08

Please sign in to comment.