diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000000..a9c4194c374 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: ruby +cache: + - bundler +install: + - bundle install --path vendor/bundle +script: + - bundle exec rake build \ No newline at end of file diff --git a/Gemfile b/Gemfile index 7cd39a2dd3c..7690f0ef99d 100644 --- a/Gemfile +++ b/Gemfile @@ -5,3 +5,5 @@ gem "jekyll-sitemap" gem "jekyll-gist" gem 'jekyll-mentions' gem 'jekyll-feed' +gem 'rake' +gem 'kramdown' diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000000..f193bed31df --- /dev/null +++ b/Rakefile @@ -0,0 +1,32 @@ +############################################################################# +# Helper functions +############################################################################# + +def with_bundler(command) + sh "bundle exec #{command}" +end + +def jekyll(command) + with_bundler "jekyll #{command}" +end + +############################################################################# +# Standard tasks +############################################################################# + +task :default => :build + +desc 'Cleanup generated files' +task :clean do + sh 'rm -rf _site' +end + +desc 'Build the site' +task build: [:clean] do + jekyll :build +end + +desc 'Serve the site locally and watch for changes' +task serve: [:clean] do + jekyll 'serve --drafts --incremental --watch' +end