From 13b26dd202e4d84e0f99e438fac2d4b3c8bc9df1 Mon Sep 17 00:00:00 2001 From: fatmeatwsl Date: Mon, 21 Apr 2025 17:00:20 +0200 Subject: [PATCH] added makefile to auto deploy --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..064305c --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +VPS_USER = debian +VPS_HOST = sleepeesoftware.fr +SSH_PORT = 54634 +VPS_PATH = /var/www/website + +.PHONY: deploy + +deploy: + @echo "⚙️ Switching to production..." + git checkout production + @echo "🔁 Merging master into production..." + git merge master + @echo "📤 Pushing production to gitea..." + git push gitea production + @echo "🔙 Switching back to master..." + git checkout master + @echo "🌐 Deploying to VPS..." + ssh $(VPS_USER)@$(VPS_HOST) -p $(SSH_PORT) "cd $(VPS_PATH) && git checkout production && git pull origin production" + @echo "✅ Deployment done!"