From d490086793ba7d64b4903b1a2a367350adf4d16a Mon Sep 17 00:00:00 2001 From: Adam Doyle Date: Mon, 7 Oct 2024 20:14:41 -0400 Subject: [PATCH] automate deployment --- build | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/build b/build index e0b6fcf..3859213 100755 --- a/build +++ b/build @@ -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