The following Makefile can be used to build, serve and deploy a Jekyll site.
REMOTE ?= "<connection info here>" build: bundle exec jekyll build push: rsync -avrz --delete-excluded _site/* $(REMOTE) deploy: build push serve: bundle exec jekyll serve --drafts --watch
REMOTE should be something like this
usernameis your username on the remote server
serveris the remote server to deploy to
pathis the remote directory files should be copied to
If rsync is unavailable on the remote machine, scp can also be used by changing
push to the following:
push: scp -r _site/* $(REMOTE)
make deploy will build the site and upload it in one command.