botserver/.forgejo/workflows/node.yaml
Rodrigo Rodriguez (Pragmatismo) 9fe9444c69
All checks were successful
GBCI / build (push) Successful in 30s
fix(workflow): comment out Node.js setup and adjust build commands in node.yaml
2025-04-19 13:36:07 -03:00

49 lines
1.2 KiB
YAML

name: GBCI
run: git config --global http.sslVerify false
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: gbo
steps:
- name: Disable SSL verification (temporary)
run: git config --global http.sslVerify false
- uses: actions/checkout@v4
# - name: Setup Node.js
# uses: actions/setup-node@v4
# with:
# node-version: '20'
# cache: 'npm'
- name: Copy files to deployment location
run: |
sudo rm -rf /opt/gbo/bin/BotServer/dist
sudo cp -r ./* /opt/gbo/bin/BotServer
sudo cp /opt/gbo/conf.d/bot/.env /opt/gbo/bin/BotServer
- name: Install production dependencies in deployment location
run: |
echo "[General Bots Deployer] Building BotServer..."
cd /opt/gbo/bin/BotServer
# sudo npm ci --production
npm run build-server
# npm run build-gbui
- name: Restart Bots Deployer
run: |
echo "[General Bots Deployer] Restarting..."
sudo systemctl stop botserver
echo "[General Bots Deployer] Stopped."
sudo systemctl start botserver
echo "[General Bots Deployer] Started."