One line deployment for Jekyll sites
A great way to deploy a Jekyll site using just rsync
. First, build (jekyll b
) the site locally and then rsync
the _site
folder:
rsync -av -e 'ssh -i ~/.ssh/id_passwordless_rsa' --delete _site/ ognjen.io:~/ognjen.io/_site
The -e 'ssh -i ~/.ssh/id_passwordless_rsa'
is not actually required if you’re executing it manually. It’s there so that the command can be run in cron that cannot unlock key rings.
Old version
So ridiculous that I keep forgetting that you can pass a command to execute on the server instead of logging in and then executing it. I use that to “deploy” this site generated by Jekyll:
Add it to ~/.bashrc
as an alias and never forget it again.