2025-03-26 19:46:19 -03:00
|
|
|
name: GBCI
|
2025-03-26 21:29:00 -03:00
|
|
|
run: git config --global http.sslVerify false
|
2025-03-26 19:46:19 -03:00
|
|
|
on:
|
|
|
|
push:
|
2025-03-26 20:34:11 -03:00
|
|
|
branches: [ "main" ]
|
2025-03-26 19:46:19 -03:00
|
|
|
pull_request:
|
2025-03-26 20:34:11 -03:00
|
|
|
branches: [ "main" ]
|
2025-03-26 19:46:19 -03:00
|
|
|
|
|
|
|
jobs:
|
2025-03-26 20:34:11 -03:00
|
|
|
build:
|
2025-03-26 19:50:42 -03:00
|
|
|
runs-on: gbo
|
2025-03-26 20:34:11 -03:00
|
|
|
|
2025-03-26 19:46:19 -03:00
|
|
|
steps:
|
2025-03-26 21:43:49 -03:00
|
|
|
|
2025-03-28 10:24:41 -03:00
|
|
|
- name: Disable SSL verification (temporary)
|
|
|
|
run: git config --global http.sslVerify false
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
2025-06-09 19:51:05 -03:00
|
|
|
# - name: Setup Node.js
|
|
|
|
# uses: actions/setup-node@v4
|
|
|
|
# with:
|
|
|
|
# node-version: '20'
|
|
|
|
# cache: 'npm'
|
2025-04-19 01:12:54 -03:00
|
|
|
|
2025-03-28 10:24:41 -03:00
|
|
|
- name: Copy files to deployment location
|
|
|
|
run: |
|
2025-04-19 13:37:55 -03:00
|
|
|
echo "[General Bots Deployer] Copying files to deploy location..."
|
2025-06-09 19:48:24 -03:00
|
|
|
sudo rm -rf /opt/gbo/bin/bot/botserver/dist
|
|
|
|
sudo cp -r ./* /opt/gbo/bin/bot/botserver
|
2025-05-11 22:44:30 -03:00
|
|
|
|
2025-03-28 10:24:41 -03:00
|
|
|
|
|
|
|
- name: Install production dependencies in deployment location
|
|
|
|
run: |
|
|
|
|
echo "[General Bots Deployer] Building BotServer..."
|
2025-06-09 19:48:24 -03:00
|
|
|
# rm -rf /opt/gbo/bin/bot/botserver/node_modules
|
|
|
|
cd /opt/gbo/bin/bot/botserver
|
|
|
|
sudo npm ci --production
|
2025-04-19 13:36:07 -03:00
|
|
|
npm run build-server
|
2025-06-09 19:48:24 -03:00
|
|
|
npm run build-gbui
|
2025-04-19 13:32:53 -03:00
|
|
|
|
2025-04-18 23:48:26 -03:00
|
|
|
|
2025-03-28 08:39:06 -03:00
|
|
|
- name: Restart Bots Deployer
|
2025-03-28 07:14:35 -03:00
|
|
|
run: |
|
2025-03-28 08:39:06 -03:00
|
|
|
echo "[General Bots Deployer] Restarting..."
|
2025-06-09 19:48:24 -03:00
|
|
|
sudo systemctl stop bot
|
2025-04-19 12:14:18 -03:00
|
|
|
echo "[General Bots Deployer] Stopped."
|
2025-06-09 19:48:24 -03:00
|
|
|
sudo systemctl start bot
|
2025-04-19 11:14:26 -03:00
|
|
|
echo "[General Bots Deployer] Started."
|