Skip to content

Instantly share code, notes, and snippets.

@christhesoul
Created August 5, 2014 21:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christhesoul/3c38053971a7b786eff2 to your computer and use it in GitHub Desktop.
Save christhesoul/3c38053971a7b786eff2 to your computer and use it in GitHub Desktop.
sample bedrock deploy.rb
set :theme_path, Pathname.new('web/app/themes/my_wp_theme')
set :local_app_path, Pathname.new('/Applications/MAMP/htdocs/my_wp_app')
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').to_s, release_path.join(fetch(:theme_path)), recursive: true
upload! fetch(:local_theme_path).join('assets/vendor/bootstrap/dist/fonts/.').to_s, release_path.join(fetch(:theme_path)).join('assets/fonts'), recursive: true
end
end
end
before "deploy:updated", "deploy:copy_assets"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment