build: makefile: add deploy step
This commit is contained in:
parent
bd20edffc5
commit
4274671a23
8
Makefile
8
Makefile
|
@ -13,6 +13,14 @@ build-prod:
|
|||
serve:
|
||||
hugo server -D -F
|
||||
|
||||
deploy:
|
||||
@if [ -n "$$SSH_KEY" ]; then eval "$$(ssh-agent)"; echo "$$SSH_KEY" | ssh-add -; fi
|
||||
@if [ -z "$$SSH_USER" ] || [ -z "$$SSH_HOST" ] || [ -z "$$SSH_TARGET" ]; \
|
||||
then echo "Missing one of SSH_USER, SSH_HOST, or SSH_TARGET" >&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
rsync --progress -avz --delete public/ "$$SSH_USER@$$SSH_HOST:$$SSH_TARGET"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) -r public
|
||||
|
|
Loading…
Reference in a new issue