message: different appraoch to preventing pull request build deploys
diff: @@ -44,22 +44,20 @@ jobs:
  script: npm run ember-tests
  name: 'Ember tests'
  node_js: "10"
  -
  -deploy:
  - - provider: script
  - skip_cleanup: true
  - on:
  - branch: master
  + - stage: deploy
  + name: 'deploy cardhost'
  + if: branch = master
  + install: skip
  script:
  - - echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/id_rsa && chmod 400 $HOME/.ssh/id_rsa
  - - sudo apt-get install socat
  - - pip install --user awscli
  - - aws ecr --region us-east-1 get-login --no-include-email | bash
  - - yarn --cwd ./packages/cardhost/deploy install
  - - cd ./packages/cardhost
  - - node ./deploy/build.js
  - - TARGET_NAME='builder.stack.cards' ./deploy/deploy.sh demo $TRAVIS_BRANCH
  - - cd ../..
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; echo "$SSH_PRIVATE_KEY" > $HOME/.ssh/id_rsa && chmod 400 $HOME/.ssh/id_rsa; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; sudo apt-get install socat; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; pip install --user awscli; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; aws ecr --region us-east-1 get-login --no-include-email | bash; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; yarn --cwd ./packages/cardhost/deploy install; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; cd ./packages/cardhost; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then node ./deploy/build.js; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then TARGET_NAME='builder.stack.cards' ./deploy/deploy.sh demo $TRAVIS_BRANCH; fi'
  + - 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; cd ../..; fi'
  before_install:
  - docker network create cardstack
  