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!"