botserver/.forgejo/workflows/node.yaml

37 lines
804 B
YAML
Raw Normal View History

name: GBCI
2025-10-06 10:29:14 -03:00
on:
push:
2025-10-06 10:29:14 -03:00
branches: ["main"]
pull_request:
2025-10-06 10:29:14 -03:00
branches: ["main"]
jobs:
build:
runs-on: gbo
2025-09-24 19:14:15 -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-10-06 10:29:14 -03:00
lxc exec bot:pragmatismo-system -- systemctl start system