Skip to content

Commit 20c8b5f

Browse files
committed
CI: deploiy wasm demo on gh-pages
1 parent 9249dd0 commit 20c8b5f

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Test Ruby
2+
3+
on:
4+
push:
5+
branches: [ master, dev ]
6+
tags:
7+
- 'v*'
8+
pull_request:
9+
branches: [ master, dev ]
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
gh-pages-wasm:
17+
runs-on: ubuntu-latest
18+
if: github.ref == 'refs/heads/master'
19+
20+
permissions:
21+
contents: write
22+
23+
steps:
24+
- name: Checkout 🛎️
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Rust ⚙️
28+
uses: actions-rs/toolchain@v1
29+
with:
30+
profile: minimal
31+
toolchain: stable
32+
override: true
33+
34+
- name: Add wasm32 target
35+
run: rustup target add wasm32-unknown-unknown
36+
37+
- name: Install wasm-pack
38+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
39+
40+
- name: Install and Build 🔧
41+
env:
42+
VITE_PARQUET_URL: ${{ vars.VITE_PARQUET_URL }}
43+
run: |
44+
cd underpass-wasm &&
45+
yarn install &&
46+
yarn build
47+
48+
- name: Deploy 🚀
49+
uses: JamesIves/github-pages-deploy-action@v4
50+
with:
51+
folder: underpass-wasm/dist
52+
53+
# docker:
54+
# runs-on: ubuntu-latest
55+
# needs: [test]
56+
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.event.ref, 'refs/tags/v')
57+
58+
# permissions:
59+
# contents: read
60+
# packages: write
61+
# id-token: write
62+
63+
# steps:
64+
# - name: Docker Build and Push
65+
# uses: cartoway/docker-compose-build-push-action@main
66+
# with:
67+
# registry_password: ${{ secrets.GITHUB_TOKEN }}
68+
# project: teritorio/underpass-api
69+
# service: api

0 commit comments

Comments
 (0)