Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw

swalkinshaw/copy.rb

Last active Aug 29, 2015
Embed
What would you like to do?
set :theme_path, Pathname.new('web/app/themes/mytheme')
set :local_app_path, Pathname.new('/Applications/MAMP/htdocs/mysite')
set :local_theme_path, fetch(:local_app_path).join(fetch(:theme_path))
namespace :deploy do
task :compile_assets do
run_locally do
within fetch(:local_theme_path) do
execute :grunt, :build
end
end
end
task :copy_assets do
invoke 'deploy:compile_assets'
on roles(:web) do
upload! fetch(:local_theme_path).join('dist'), release_path.join(fetch(:theme_path)), recursive: true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment