Thibaut Wdowiak's Blog

Simplest way to deploy static site over ftp

27 Oct 2013 // hacks

Look at that!

Simplest way to deploy a static web site, like those generated by jekyll, over ftp.
Just create a deploy.sh file at the root of your site directory:

FTP_SITE=your.site.com
FTP_USER=yourusername
FTP_PWD=yourpassword

olddir=`pwd`
cd _site 
lftp -e "cd www && mirror -Re --parallel=1 -x deploy.sh -vv && quit" -u $FTP_USER,$FTP_PWD $FTP_SITE
cd $olddir

Then just type .deploy.sh and BAM, done.
Nothing fancy, nothing new, but it works and it is simple.