2025-03-26 19:46:19 -03:00
|
|
|
name: GBCI
|
2025-10-06 10:29:14 -03:00
|
|
|
|
2025-03-26 19:46:19 -03:00
|
|
|
on:
|
|
|
|
|
push:
|
2025-10-06 10:29:14 -03:00
|
|
|
branches: ["main"]
|
2025-03-26 19:46:19 -03:00
|
|
|
pull_request:
|
2025-10-06 10:29:14 -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-09-24 19:14:15 -03:00
|
|
|
|
2025-03-26 19:46:19 -03:00
|
|
|
steps:
|
2025-09-24 19:14:15 -03:00
|
|
|
- name: Disable SSL verification (temporary)
|
|
|
|
|
run: git config --global http.sslVerify false
|
|
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
2025-10-06 10:29:14 -03:00
|
|
|
- name: Install Rust
|
|
|
|
|
uses: msrd0/rust-toolchain@v1
|
|
|
|
|
with:
|
|
|
|
|
toolchain: stable
|
2025-09-24 19:14:15 -03:00
|
|
|
|
2025-10-06 10:29:14 -03:00
|
|
|
- name: Run build
|
2025-09-24 19:14:15 -03:00
|
|
|
run: |
|
2025-10-06 10:29:14 -03:00
|
|
|
sudo cp /opt/gbo/bin/system/.env .
|
|
|
|
|
cargo build --locked
|
2025-09-24 19:14:15 -03:00
|
|
|
|
2025-10-06 10:29:14 -03:00
|
|
|
- name: Deploy binary and restart
|
2025-09-24 19:14:15 -03:00
|
|
|
run: |
|
2025-10-06 10:29:14 -03:00
|
|
|
lxc exec bot:pragmatismo-system -- systemctl stop system
|
2025-09-24 19:14:15 -03:00
|
|
|
|
2025-10-06 10:29:14 -03:00
|
|
|
sudo cp ./target/debug/gbserver /opt/gbo/bin/system
|
|
|
|
|
sudo chmod +x /opt/gbo/bin/system/gbserver
|
2025-03-26 21:43:49 -03:00
|
|
|
|
2025-10-06 10:29:14 -03:00
|
|
|
lxc exec bot:pragmatismo-system -- systemctl start system
|