Skip to content

Use Node 17.

Use Node 17. #70

Workflow file for this run

name: Build dist
on:
push:
branches:
- master
jobs:
build_dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Check Cargo.lock is up-to-date with Cargo.toml and check build
run: cargo check --target wasm32-unknown-unknown --locked
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Use Node.js 17.x
uses: actions/setup-node@v1
with:
node-version: 17.x
- run: npm install
- run: NODE_OPTIONS=--openssl-legacy-provider npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/
- name: Deploy
run: |
git fetch --depth=1 origin gh-pages
git worktree add _deploy gh-pages
cd _deploy
git config --local user.name github-actions[bot]
git config --local user.email 41898282+github-actions[bot]@users.noreply.github.com
rm -rf dev/
mv ../dist dev
git add dev/
git commit -m "Action \`dist\`: Deploy ${GITHUB_SHA::7} as dev"
git push