Skip to content

Build web project

Build web project #10

Workflow file for this run

# This file is autogenerated by maturin v1.3.1
# To update, run
#
# maturin generate-ci github
#
name: WebAssembly
on:
push:
branches:
- main
- master
- github-action
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
apt update -y && apt-get install clang -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --profile=minimal --target=wasm32-unknown-unknown
npm install -g wasm-pack
- name: Build
run: |
wasm-pack build --target=web --release --out-dir=./map/pkg
- name: Deploy
run: |
cd ./aisdb_web
npm install
cd map
export VITE_DISABLE_SSL_DB=1
export VITE_DISABLE_STREAM=1
export VITE_AISDBHOST=localhost
export VITE_AISDBPORT=9924
npx vite build --outDir=./dist_map
export VITE_BINGMAPTILES=1
export VITE_TILESERVER=aisdb.meridian.cs.dal.ca
npx vite build --outDir=./dist_map_bingmaps
- name: Update Artifact
uses: actions/upload-artifact@v2
with:
name: map
path: ./aisdb_web/