-
Notifications
You must be signed in to change notification settings - Fork 142
44 lines (41 loc) · 1.33 KB
/
wasmtest.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
name: WasmTest
on:
push:
branches:
# Change this to the branch name you make changes to the documentation on
- wasm
jobs:
WasmTest:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Setup and build WASM
run: |
cd ..
./mne-cpp/tools/wasm.sh --source https://github.com/mne-tools/mne-cpp.git --qt 5.15 --emsdk 3.1.20
- name: Setup Github credentials
uses: fusion-engineering/setup-git-credentials@v2
with:
credentials: ${{secrets.GIT_CREDENTIALS_WASM_TEST}}
- name: Update gh-pages branch with new wasm version
run: |
# Setup git credentials
git config --global user.email [email protected]
git config --global user.name dev
# Save the wasm files first
cp -RT out/Release/ ../bin
# Replace logo
cp -RT resources/design/logos/qtlogo.svg ../bin/qtlogo.svg
# Checkout the gh-pages branch
git fetch origin gh-pages
git checkout --track origin/gh-pages
# Clean and remove all files first
git clean -f -d
git rm * -r
git commit --amend -a -m 'Update wasm' --allow-empty
# Add the saved wasm files
cp -RT ../bin .
git add --all
git commit --amend -a -m 'Update wasm'
git push origin gh-pages -f