require 'jekyll' require 'html-proofer' task :default => [:buildsite] desc 'Build the site' task :buildsite do #def Jekyll::env # "production" #end # fuck this, the whole process won't work unless I figure out how to activate all plugins ###Jekyll::Commands::Build.process({}) ENV["JEKYLL_ENV"]="production" sh "bundle", "exec", "jekyll", "build" end desc 'Clean up built files' task :clean do puts 'Cleaning up _site...'.bold Jekyll::Commands::Clean.process({}) end desc 'Test the site using html-proofer' task :testsite => [:buildsite] do options = { :assume_extension => true } HTMLProofer.check_directory("./_site", options).run true end namespace :deploy do desc "Deploy via SSH" task :ssh => [:buildsite] do sh "rsync", "-av", "_site/", "w019f723.kasserver.com:/www/htdocs/w019f723/blog.uvokchee.de/" end desc "Deploy via FTP" task :ftp => [:buildsite] do puts 'This is a no-op now' end end