Skip to content

Commit

Permalink
use microstatic rake tasks to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
moredip committed May 30, 2013
1 parent a110bdd commit 861c165
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ rvm:
- 1.9.3
script:
- rake generate
- rake deploy
- rake deploy:preview
env:
global:
- secure: ! 'EShtaDZJGtAPbrx7yzNEaXw+pLvOfyMklloEgLa9mvRtniYGXF9iQjcUYSvq
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ source 'http://rubygems.org'
gem "rake"
gem "jekyll", "0.11.0"
gem "liquid", "~>2.2.2"
gem "microstatic", "~> 0.1.0"
gem "microstatic", "~> 0.2.0"
6 changes: 5 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ GEM
liquid (2.2.2)
maruku (0.6.0)
syntax (>= 1.0.0)
microstatic (0.2.0)
aws-s3 (~> 0.6.3)
mime-types (1.23)
posix-spawn (0.3.6)
rake (10.0.4)
syntax (1.0.0)
xml-simple (1.1.2)

PLATFORMS
ruby

DEPENDENCIES
aws-s3 (~> 0.6.3)
jekyll (= 0.11.0)
liquid (~> 2.2.2)
microstatic (~> 0.2.0)
rake
21 changes: 16 additions & 5 deletions tasks/deploy_tasks.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'microstatic'
require 'microstatic/rake'

PREVIEW_AWS_BUCKET = "preview.testingwithfrank.com"
PRODUCTION_AWS_BUCKET = "preview.testingwithfrank.com" # NOT CONFIDENT QUITE YET
Expand All @@ -16,8 +16,19 @@ def deploy_to_bucket(bucket)
deployer.upload
end

desc "deploy to production"
task :deploy do
deploy_to_bucket(PRODUCTION_AWS_BUCKET)
end
namespace :deploy do
source_dir = File.expand_path("../../public",__FILE__)


desc "deploy to production"
Microstatic::Rake.s3_deploy_task( :prod ) do |task|
task.source_dir = source_dir
task.bucket_name = PRODUCTION_AWS_BUCKET
end

desc "deploy to preview"
Microstatic::Rake.s3_deploy_task( :preview ) do |task|
task.source_dir = source_dir
task.bucket_name = PREVIEW_AWS_BUCKET
end
end

0 comments on commit 861c165

Please sign in to comment.