Skip to content

add wasm support

add wasm support #6

Workflow file for this run

name: Build Explorer UI
on:
push:
branches:
- $default-branch
pull_request:
permissions:
contents: read
pages: write
id-token: write
jobs:
build_explorer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
standalone: true
package_json_file: 'ui/package.json'
version: latest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '21'
cache: 'pnpm'
cache-dependency-path: './ui/pnpm-lock.yaml'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true
check-latest: true
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
cache: 'pip'
cache-dependency-path: 'scripts/requirements.txt'
- name: Install dependencies
working-directory: ./ui
run: pnpm install
- name: Add python dependencies
run: |
pip install -r scripts/requirements.txt
- name: Download deps
run: go mod download
- name: Build wasm
run: |
python scripts/wasm.py
- name: Build
working-directory: ./ui
run: pnpm run build:explorer
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
PULL_REQUEST_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
- name: Upload pages artifact
uses: actions/upload-artifact@v4
with:
path: 'ui/dist/explorer/'
deploy:
if: ${{ github.event_name == 'push' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4