Created
August 5, 2014 21:23
-
-
Save christhesoul/3c38053971a7b786eff2 to your computer and use it in GitHub Desktop.
sample bedrock deploy.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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