-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (64 loc) · 2.36 KB
/
deploy.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
name: Deploy Website
on:
push:
branches:
- main # Or your default branch
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout Vortex Engine
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetches all history for all branches and tags
repository: 'StoneOrbits/VortexEngine'
path: 'VortexEngine'
ref: 'desktop'
# Build Vortex CLI Tool
- name: Build Vortex CLI Tool
run: |
cd VortexEngine/VortexEngine/VortexCLI
make -j
# Install Emscripten dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 nodejs cmake
# Install Emscripten
- name: Install Emscripten
run: |
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
# Build using Emscripten
- name: Build WebAssembly with Emscripten
run: |
source emsdk/emsdk_env.sh
cd VortexEngine/VortexEngine/VortexLib
make clean
make -j wasm
# Cache build artifacts
- name: Cache VortexLib Build Artifacts
uses: actions/cache@v3
with:
path: |
VortexEngine/VortexEngine/VortexLib/VortexLib.js
VortexEngine/VortexEngine/VortexLib/VortexLib.wasm
key: VortexLib-${{ github.sha }}
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
- name: Add Linode to known_hosts
run: ssh-keyscan 172.232.170.43 >> ~/.ssh/known_hosts
- name: Deploy to Linode
run: |
scp VortexEngine/VortexEngine/VortexLib/VortexLib.js [email protected]:/home/lightshow/lightshow.lol/js/VortexLib.js
scp VortexEngine/VortexEngine/VortexLib/VortexLib.wasm [email protected]:/home/lightshow/lightshow.lol/js/VortexLib.wasm
scp VortexEngine/VortexEngine/VortexCLI/vortex [email protected]:/home/lightshow/vortex
ssh [email protected] 'sudo /usr/bin/mv /home/lightshow/vortex /usr/local/bin/vortex'
#ssh [email protected] 'sudo systemctl stop lightshow.lol'
ssh [email protected] 'cd /home/lightshow/lightshow.lol && git pull'
#ssh [email protected] 'sudo systemctl start lightshow.lol'