added makefile to auto deploy
This commit is contained in:
parent
3d2a5fda81
commit
13b26dd202
19
Makefile
Normal file
19
Makefile
Normal file
@ -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!"
|
||||||
Loading…
x
Reference in New Issue
Block a user