-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 979 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
KEY = ${HOME}/.ssh/key-x441
DOMAIN = kloeckner.com.ar
ROOT_PATH = $(CURDIR)
all: sync
build:
./scripts/build.sh ${ROOT_PATH}
./scripts/sync.sh ${ROOT_PATH}
sync: build
sudo ./scripts/deploy_local.sh ${ROOT_PATH}
force-sync:
./scripts/build.sh ${ROOT_PATH}
./scripts/sync.sh --force-update ${ROOT_PATH}
sudo ./scripts/deploy_local.sh ${ROOT_PATH}
deploy:
rsync -e "ssh -i $(KEY)" -rahvPt --delete --delete-excluded \
--exclude=.git \
--exclude=./scripts/^js \
--exclude=./style/git.css \
--exclude=./common/logo.webp \
--exclude=Makefile \
./ root@$(DOMAIN):/var/www/html/
rsync -e "ssh -i $(KEY)" -rahvPt --delete --delete-excluded \
--exclude=.git \
./css/git.css root@$(DOMAIN):/var/www/git/style.css
rsync -e "ssh -i $(KEY)" -rahvPt --delete --delete-excluded \
--exclude=.git \
./common/logo.webp root@$(DOMAIN):/var/www/git/logo.png
ssh -i $(KEY) root@$(DOMAIN) -t 'systemctl restart nginx'
.PHONY: build sync force-sync deploy