-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
38 lines (29 loc) · 835 Bytes
/
Copy pathdeploy.sh
File metadata and controls
38 lines (29 loc) · 835 Bytes
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
#!/usr/bin/env sh
# abort on errors
set -e
# init submodules
git submodule update --init
# build AR Engine WASM if emcc is available
if command -v emcc >/dev/null 2>&1; then
make -C ar-engine/engine/
else
echo "Warning: emcc not found, skipping AR Engine WASM build"
fi
# build
npm ci
npx vitepress build
# copy AR Engine web assets into dist (if ar-engine/web exists)
if [ -d "ar-engine/web" ]; then
mkdir -p .vitepress/dist/ar
cp -r ar-engine/web/. .vitepress/dist/ar/
fi
# navigate into the build output directory
cd .vitepress/dist
git config --global user.email "github-actions@example.com"
git config --global user.name "GitHubActions[Bot]"
git init
git remote add origin https://alterfo:$1@github.com/alterfo/alterfo.github.io.git
git add -A
git commit -m 'deploy'
git push -f --set-upstream origin master
cd -