-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (54 loc) · 1.64 KB
/
html-staging.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
name: HTML
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
EM_VERSION: 3.1.40
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up cache
id: emscripten-cache
uses: actions/cache@v4
with:
path: ${{env.EM_CACHE_FOLDER}}
key: emcache-${{env.EM_VERSION}}-${{ runner.os }}
- uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
- uses: friendlyanon/setup-vcpkg@v1
with:
committish: b4624c3a701b11248d88aab08744a37ee7aea1cc
path: the-vcpkg
cache-version: gh-pages
- name: Build
run: |
mkdir build
cd build
emcmake cmake -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release \
-D"VCPKG_CHAINLOAD_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake" \
-DVCPKG_TARGET_TRIPLET=wasm32-emscripten \
-D"CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DALIA_BUILD_DOCS=OFF \
-DALIA_ENABLE_UI=OFF \
..
make -j
- name: Deploy
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
repository-name: alialib/alia-staging
target-folder: html
token: ${{ secrets.ALIA_GHPAGES_DEPLOYMENT_TOKEN }}
branch: gh-pages
folder: build/integrations/html/deploy