Created
August 14, 2016 08:37
-
-
Save 0xF013/838beedd7fd11ecf8df5ff00ee56cb51 to your computer and use it in GitHub Desktop.
This file contains 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
namespace :npm do | |
desc 'setups frontend and deploys in to /public dir' | |
task :setup_frontend do | |
on roles(:all) do | |
within release_path do | |
api_env = fetch(:api_env, :dev) | |
execute "cd #{release_path}/frontend \ | |
&& npm install --silent --no-spin \ | |
&& API_ENV=#{api_env} npm run build-prod \ | |
&& ln -s ../REVISION ../public/version.txt \ | |
" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment