Created
May 31, 2014 04:24
-
-
Save y-ogi/afe91827136ec9496d72 to your computer and use it in GitHub Desktop.
wercker.yml to deploy heroku
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
box: wercker/nodejs | |
# Build definition | |
build: | |
# The steps that will be executed on build | |
steps: | |
# A step that executes `npm install` command | |
- npm-install | |
# A step that executes `npm test` command | |
#- npm-test | |
- add-to-known_hosts: | |
hostname: heroku.com | |
- script: | |
name: make .ssh directory | |
code: mkdir -p "$HOME/.ssh" | |
- create-file: | |
name: write private key | |
filename: $HOME/.ssh/id_rsa | |
content: $HEROKU_PRIVATE | |
overwrite: true | |
hide-from-log: true | |
- script: | |
name: set permissions to private key | |
code: chmod 0400 $HOME/.ssh/id_rsa | |
- script: | |
name: clone from heroku | |
code: | | |
git clone $GET_REPOS dist | |
- script: | |
name: install grunt and bower | |
code: | | |
npm install grunt-cli | |
npm install bower | |
- script: | |
name: bower install | |
code: | | |
node_modules/bower/bin/bower install | |
- script: | |
name: grunt build | |
code: | | |
node_modules/grunt-cli/bin/grunt build | |
- script: | |
name: set up git repository | |
code: | | |
git config --global user.name "$GIT_USER_NAME" | |
git config --global user.email "$GIT_USER_EMAIL" | |
- script: | |
name: deploy to heroku | |
code: | | |
cd dist | |
git add . -A | |
git commit -m "$GIT_COMMIT_MESSAGE" | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment