Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. language: node_js
  2.  
  3. node_js:
  4. - 10.15.1
  5.  
  6. cache:
  7. directories:
  8. - node_modules
  9.  
  10. branches:
  11. only:
  12. - staging
  13. - master
  14.  
  15. before_script:
  16. - npm install
  17.  
  18. script:
  19. - if [[ "$TRAVIS_BRANCH" = "master" || "$TRAVIS_BRANCH" = "staging" ]]; then npm run build; else echo "not a build branch"; fi
  20.  
  21. before_deploy:
  22. - cd $TRAVIS_BUILD_DIR
  23. - sed -i '/dist/d' .gitignore
  24. - git add . && git commit -m "latest build"
  25.  
  26. deploy:
  27. - provider: elasticbeanstalk
  28. access_key_id: <YOUR_ACCESS_KEY>
  29. secret_access_key:
  30. secure: <YOUR_SECRET_ACCESS_KEY>
  31. region: "<HOSTING_REGION>" // "ap-south-1"
  32. app: "<APP_NAME>" // "demo-application"
  33. env: "<ENV_NAME>" // "demo-production"
  34. bucket_name: "<S3_BUCKET_NAME>" // Once you create new application, it will automatically create a unique bucket for it.
  35. on:
  36. branch: <GIT_BRANCH_NAME> // For example: - master
  37.  
  38. after_deploy:
  39. - echo "Applcation Deployed!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement