forked from africinnovate/health-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (27 loc) · 1013 Bytes
/
Copy pathdeploy-staging.yml
File metadata and controls
37 lines (27 loc) · 1013 Bytes
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
name: Deploy Health Bridge - Staging
on:
push:
branches: [ "staging" ]
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build in release mode
run: cargo build --release
- name: Stop service before replacing binary
run: systemctl --user stop health-bridge
- name: Copy binary to deployment location
run: |
mkdir -p /home/afric/apps/hb/target/release
cp target/release/health-bridge /home/afric/apps/hb/target/release/
chmod +x /home/afric/apps/hb/target/release/health-bridge
- name: Start service
run: systemctl --user start health-bridge
- name: Wait for service to start
run: sleep 2
- name: Check service status
run: systemctl --user status health-bridge --no-pager
- name: Show recent logs
run: journalctl --user -u health-bridge -n 20 --no-pager