Skip to content

Instantly share code, notes, and snippets.

@swalkinshaw
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swalkinshaw/59945b121f575f2a9b13 to your computer and use it in GitHub Desktop.
Save swalkinshaw/59945b121f575f2a9b13 to your computer and use it in GitHub Desktop.
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