forked from AISViz/AISdb-Server
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (77 loc) · 2.31 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# This file is autogenerated by maturin v1.3.1
# To update, run
#
# maturin generate-ci github
#
name: Web
on:
push:
branches:
- main
- master
- github-action
tags:
- '*'
pull_request:
workflow_dispatch:
permissions:
contents: write
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: |
cd ./web_assembly
wasm-pack build --target=web --release --out-dir=../map/pkg
- name: Deploy
run: |
npm install
mkdir aisdb_web
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=../aisdb_web/dist_map
export VITE_BINGMAPTILES=1
export VITE_TILESERVER=aisdb.meridian.cs.dal.ca
npx vite build --outDir=../aisdb_web/dist_map_bingmaps
cd ..
mv ./map/pkg/ ./aisdb_web/map/pkg/
- name: zip dist
run: |
zip -r aisdb_web.zip aisdb_web
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
- name: Upload Release Asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./aisdb_web.zip
asset_name: aisdb_web.zip
asset_content_type: application/zip
# - name: Update Artifact
# uses: actions/upload-artifact@v2
# with:
# name: aisdb_web
# path: |
# aisdb_web/map/pkg
# aisdb_web/dist_map
# aisdb_web/dist_map_bingmaps