build: makefile: add deploy step
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
bd20edffc5
commit
ee916a506b
1 changed files with 5 additions and 0 deletions
5
Makefile
5
Makefile
|
|
@ -13,6 +13,11 @@ build-prod:
|
|||
serve:
|
||||
hugo server -D -F
|
||||
|
||||
deploy:
|
||||
@if [ -n "$$KEY" ]; then eval "$$(ssh-agent)"; echo "$$KEY" | ssh-add -; fi
|
||||
if [ -z "$$USERNAME" ] || [ -z "$$SSH_HOST" ] || [ -z "$$TARGET" ]; then exit 1; fi
|
||||
rsync --progress -avz --delete public/ "$$USERNAME@$$SSH_HOST:$$TARGET"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(RM) -r public
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue