Skip to content

Instantly share code, notes, and snippets.

@tgrrtt
Created November 11, 2014 00:39
Show Gist options
  • Save tgrrtt/909139a7a236a5167031 to your computer and use it in GitHub Desktop.
Save tgrrtt/909139a7a236a5167031 to your computer and use it in GitHub Desktop.
Travis Example
language: node_js
node_js:
- '0.10'
notifications:
email: false
after_success:
- test $TRAVIS_PULL_REQUEST = false
&& echo -e "Host *.cloudapp.net\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
&& openssl aes-256-cbc -K $encrypted_1d50cdfa274b_key -iv $encrypted_1d50cdfa274b_iv -in .travis/k.key.enc -out .travis/k.key -d
&& chmod 600 .travis/k.key
&& eval $(ssh-agent)
&& ssh-add .travis/k.key
- test $TRAVIS_BRANCH == "develop"
&& test $TRAVIS_PULL_REQUEST = false
&& git remote add deploy-server $SSH_ADDRESS:$BARE_GIT_PATH
&& git push --force deploy-server $TRAVIS_BRANCH:$TRAVIS_BRANCH
# - test $TRAVIS_BRANCH != "develop"
# && gulp build && cp package.json dist/package.json
# && cp bower.json dist/bower.json
# && cd dist
# && npm install --production
# && cd $TRAVIS_BUILD_DIR
# && tar -zcvf $REPONAME-$TRAVIS_BRANCH.tar.gz dist && export PRODBUILDCOMPLETE=true
# deploy:
# provider: releases
# api_key:
# secure: XTUX4TwgJfSFzGm46g8cDQbVBCaAIP7IVjKD5tquXvYfQaNLkUvEM3t1mjqXXADYHKWpDMj117meyVD8EJhilUOKCHnJq/9XCWhhbTXzDaTR/xl45/4CIb+GAKe4ZKv5JW4xpmjsc1o1AtyjwUHXGw2VUMlAo3FKv913267ZsSM=
# file: $REPONAME-$TRAVIS_BRANCH.tar.gz
# on:
# condition: $PRODBUILDCOMPLETE = true
# repo: $ORGNAME/$REPONAME
# all_branches: true
# tags: true
# after_deploy:
# - ssh $SSH_ADDRESS "./deploy.sh $TRAVIS_BRANCH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment