💾 Archived View for kayt.dev › gemlog › deploy.bat.gmi captured on 2023-04-26 at 13:09:39. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2022-06-04)
-=-=-=-=-=-=-
Published: 2022-3-21
its probably rather ineficient, but idrc
to host my capsule im running agate on my linux box and pulling from a private git repo
to update that repo, im just using GH desktop on my machine, and running a remote deply script over ssh
# clear cd ~/kayt-dev-gemini/ echo "---------- Pulling from git ----------" git pull git@github.com:Kaytwastaken/kayt-dev-gemini.git echo "------- Restarting pm2 process -------" echo " -> pm2 delete kayt-dev-gemini" echo " -> ./start.sh" pm2 delete kayt-dev-gemini ./start.sh echo "------------ Deploy done -------------"
echo "-Starting kayt-dev-gemini Agate server in pm2-" pm2 --name kayt-dev-gemini start "~/kayt-dev-gemini/bin/agate --hostname kayt.dev --content ~/kayt-dev-gemini/content/ --lang en-US" pm2 save
but naturally, i went, "what if i didn't need to open GHD to push to git"
so then i threw together deploy.bat on my machine
IF [%1] == [] GOTO Exit git commit -m %1 git push ssh -t node@neuromancer ~/kayt-dev-gemini/deploy.sh :Exit exit
this is also the uh,, first time ive used git in the command line and the first time ive really used batch scripting
so i quickly learned that i need to git add before commiting, so the script isn't,,, /overly/ useful, but i still like it!
i also learned how to do conditionals (kinda) in batch!
also console go brr and it make brain go :D