use middleman deploy
This commit is contained in:
parent
b257c8cdda
commit
b03dfd6ecf
1
Gemfile
1
Gemfile
@ -3,6 +3,7 @@ source "http://rubygems.org"
|
||||
gem "compass"
|
||||
gem "middleman"
|
||||
gem "middleman-livereload"
|
||||
gem "middleman-deploy"
|
||||
gem 'rb-inotify', require: false
|
||||
gem 'rb-fsevent', require: false
|
||||
gem "compass-holmes"
|
||||
|
@ -53,6 +53,10 @@ GEM
|
||||
rack-test (~> 0.6.1)
|
||||
thor (>= 0.15.2, < 2.0)
|
||||
tilt (~> 1.3.6)
|
||||
middleman-deploy (0.1.2)
|
||||
middleman-core (>= 3.0.0)
|
||||
net-sftp
|
||||
ptools
|
||||
middleman-livereload (3.1.0)
|
||||
em-websocket (>= 0.2.0)
|
||||
middleman-core (>= 3.0.2)
|
||||
@ -66,8 +70,12 @@ GEM
|
||||
sprockets-helpers (~> 1.0.0)
|
||||
sprockets-sass (~> 1.0.0)
|
||||
multi_json (1.8.0)
|
||||
net-sftp (2.1.2)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.7.0)
|
||||
oily_png (1.1.0)
|
||||
chunky_png (~> 1.2.7)
|
||||
ptools (1.2.2)
|
||||
rack (1.5.2)
|
||||
rack-livereload (0.3.15)
|
||||
rack
|
||||
@ -110,6 +118,7 @@ DEPENDENCIES
|
||||
compass
|
||||
compass-holmes
|
||||
middleman
|
||||
middleman-deploy
|
||||
middleman-livereload
|
||||
oily_png
|
||||
rake
|
||||
|
26
Rakefile
26
Rakefile
@ -1,26 +0,0 @@
|
||||
ssh_user = "joerg@higgsboson.tk"
|
||||
ssh_port = "22"
|
||||
document_root = "/srv/http/home"
|
||||
rsync_delete= true
|
||||
|
||||
public_dir = "build"
|
||||
source_dir = "source"
|
||||
|
||||
desc "Generate jekyll site"
|
||||
task :generate do
|
||||
system "middleman build"
|
||||
end
|
||||
|
||||
desc "Deploy website via rsync"
|
||||
task :deploy do
|
||||
exclude = ""
|
||||
if File.exists?('./rsync-exclude')
|
||||
exclude = "--exclude-from '#{File.expand_path('./rsync-exclude')}'"
|
||||
end
|
||||
puts "## Deploying website via Rsync"
|
||||
system("rsync -avze 'ssh -p #{ssh_port}' #{exclude} #{"--delete" unless rsync_delete == false} \"#{public_dir}/\" \"#{ssh_user}:#{document_root}\"")
|
||||
end
|
||||
|
||||
desc "Generate website and deploy"
|
||||
task :gen_deploy => [:generate, :deploy] do
|
||||
end
|
@ -77,6 +77,14 @@ end
|
||||
# Change the images directory
|
||||
# set :images_dir, "alternative_image_directory"
|
||||
|
||||
activate :deploy do |deploy|
|
||||
deploy.method = :rsync
|
||||
deploy.host = "higgsboson.tk"
|
||||
deploy.path = "/srv/http/home"
|
||||
deploy.build_before = true
|
||||
deploy.user = "deploy"
|
||||
end
|
||||
|
||||
# Build-specific configuration
|
||||
configure :build do
|
||||
# For example, change the Compass output style for deployment
|
||||
|
Loading…
Reference in New Issue
Block a user