Forked from Maxim-Filimonov/Codeship deployment script
Created
July 19, 2016 02:37
-
-
Save ruyaoyao/f13d08672056fe71453f26e825384ffd to your computer and use it in GitHub Desktop.
Precompile assets on codeship
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
# Assuming that you have followed all the instructions from https://github.com/rumblelabs/asset_sync | |
# Put this in your deployment script | |
# Choose any environment here the important part is that your environment is using the same bucket for all environments | |
# than you only need to precompile assets once | |
RAILS_ENV=staging bundle exec rake assets:precompile | |
# You need to set git credentials otherwise it won't be able to commit | |
git config --global user.email "[email protected]" | |
git config --global user.name "Codeship Server" | |
# Add your manifest file so that rails can find digested version of files | |
git add --force public/assets/manifest*.json | |
# Commit with special --skip-ci command which indicates to codeship to ignore this commit. To avoid infinite build. | |
git commit -m "Update assets --skip-ci" | |
# Because it's in detached head a bit funky syntax required to push changes back to your master | |
git push [email protected]:<owner/name_of_your_repo>.git HEAD:master |
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
# .cloud66/manifest.yml | |
development: | |
rails: | |
configuration: | |
use_asset_pipeline: false | |
qa: | |
rails: | |
configuration: | |
use_asset_pipeline: false | |
staging: | |
rails: | |
configuration: | |
use_asset_pipeline: false | |
production: | |
rails: | |
configuration: | |
use_asset_pipeline: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment