automate deployment

This commit is contained in:
Adam 2024-10-07 20:14:41 -04:00
parent 6fec952ab1
commit d490086793

13
build
View file

@ -2,12 +2,19 @@
# build
cargo build --release
rm -rf ./cards
mkdir cards
cp ./target/release/server ./cards/
rm -rf ./dist
trunk build --release
cp -r ./dist ./cards/
# deploy - note deez is the hostname of my server
rsync -avzp cards deez:
# deploy
rsync -avzp cards deez:cards/
ssh -l "$USER" deez -t "cd cards
rm server
rm -rf dist
mv cards/* .
rmdir cards
sudo -S systemctl restart cards"
rm -rf cards