1 KEY = ${HOME}/.ssh/key-x441 2 DOMAIN = kloeckner.com.ar 3 ROOT_PATH = $(CURDIR) 4 5 all: sync 6 7 build: 8 ./scripts/build.sh ${ROOT_PATH} 9 ./scripts/sync.sh ${ROOT_PATH} 10 11 sync: build 12 sudo ./scripts/deploy_local.sh ${ROOT_PATH} 13 14 force-sync: 15 ./scripts/build.sh ${ROOT_PATH} 16 ./scripts/sync.sh --force-update ${ROOT_PATH} 17 sudo ./scripts/deploy_local.sh ${ROOT_PATH} 18 19 deploy: 20 rsync -e "ssh -i $(KEY)" -rahvPt --delete \ --exclude=.git \ 21 --exclude=${ROOT_PATH}/scripts --exclude=${ROOT_PATH}/style/git.css \ 22 --delete-excluded ./ root@$(DOMAIN):/var/www/html/ 23 rsync -e "ssh -i $(KEY)" -rahvPt \ 24 ./style/git.css root@$(DOMAIN):/var/www/git/ 25 ssh -i $(KEY) root@$(DOMAIN) -t 'systemctl restart nginx' 26 27 .PHONY: build sync force-sync deploy