Add CICD deploy script
Hal Deployment / build (push) Successful in 5m54s Details
Hal Deployment / deploy (push) Failing after 6s Details

This commit is contained in:
Lucy Bladen 2025-05-03 12:50:44 +01:00
parent 483759edf7
commit dd02532de1
2 changed files with 13 additions and 1 deletions

2
Cargo.lock generated
View File

@ -921,7 +921,7 @@ dependencies = [
]
[[package]]
name = "hal-discord"
name = "hal"
version = "0.1.0"
dependencies = [
"built",

12
cicd/deploy.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/bash
bot=$(echo "$1" | tr '[:upper:]' '[:lower:]')
echo "Running deploy for bot ${bot}"
ssh badgey@hal-9000 sudo /usr/bin/systemctl stop $bot
rsync -avP badgey badgey@hal-9000:/srv/$bot/$bot
rsync -avP config badgey@hal-9000:/srv/$bot/
rsync -avP txt badgey@hal-9000:/srv/$bot/
ssh badgey@hal-9000 chmod a+x /srv/$bot/$bot
ssh badgey@hal-9000 sudo /usr/bin/systemctl start $bot