Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- language: node_js
- node_js:
- - 10.15.1
- cache:
- directories:
- - node_modules
- branches:
- only:
- - staging
- - master
- before_script:
- - npm install
- script:
- - if [[ "$TRAVIS_BRANCH" = "master" || "$TRAVIS_BRANCH" = "staging" ]]; then npm run build; else echo "not a build branch"; fi
- before_deploy:
- - cd $TRAVIS_BUILD_DIR
- - sed -i '/dist/d' .gitignore
- - git add . && git commit -m "latest build"
- deploy:
- - provider: elasticbeanstalk
- access_key_id: <YOUR_ACCESS_KEY>
- secret_access_key:
- secure: <YOUR_SECRET_ACCESS_KEY>
- region: "<HOSTING_REGION>" // "ap-south-1"
- app: "<APP_NAME>" // "demo-application"
- env: "<ENV_NAME>" // "demo-production"
- bucket_name: "<S3_BUCKET_NAME>" // Once you create new application, it will automatically create a unique bucket for it.
- on:
- branch: <GIT_BRANCH_NAME> // For example: - master
- after_deploy:
- - echo "Applcation Deployed!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement