Skip to content

Commit

Permalink
ci: Update js-demo build job for esbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed Dec 5, 2021
1 parent 1be608e commit 1c20286
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/build-wasm.yml
Expand Up @@ -67,21 +67,32 @@ jobs:
cp binaryen-/bin/* $HOME/.local/bin/
- name: Yarn install
run: cd crates/wasm/js-demo && yarn
- name: Yarn build (dev)
if: ${{ github.ref != 'refs/heads/master' }}
run: cd crates/wasm/js-demo && yarn build -d
- name: Yarn build (prod)
if: ${{ github.ref == 'refs/heads/master' }}
run: cd crates/wasm/js-demo && yarn build -p
working-directory: crates/wasm/js-demo
run: yarn install

- name: >
Build WASM pkg
(${{ github.ref == 'refs/heads/master' && '--release' || '--dev' }})
working-directory: crates/wasm
run: >
./scripts/npm-pkg-config.sh
${{ github.ref != 'refs/heads/master' && '--dev' || '' }}
--targets browser
--set-name @citeproc-rs/wasm
--dest ./pkg
--features console,dot
- run: yarn build
working-directory: crates/wasm/js-demo

- name: Deploy
if: ${{ github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_DIR: ./crates/wasm/js-demo/dist
PUBLISH_DIR: ./crates/wasm/js-demo/build
EXTERNAL_REPOSITORY: cormacrelf/citeproc-wasm-demo
PUBLISH_BRANCH: gh-pages

Expand Down

0 comments on commit 1c20286

Please sign in to comment.