0
votes

I'm trying to build and deploy an Ionic (3) browser application to Azure via Travis.CI. Pretty much all of my professional experience with CI/Deployments has been with TFS and I'm not sure if what I'm trying here is on the right path.

Here are the directions I found via Travis and Azure, but to me it is still a little ambiguous: https://docs.travis-ci.com/user/deployment/azure-web-apps/

Here is my .travis.yml file:

branches:
  only:
    - master
    - dev
before_install:
- npm install -g [email protected] [email protected]
script: 
- npm install
- ionic cordova build browser
before_deploy:
- rm .gitignore
deploy:
  provider: azure_web_apps
  verbose: true
  on: dev
  skip_cleanup: true
  overwrite: true

Ideally I'd just deploy what ionic produces in the /platforms/browser/www directory, but based on what is in the instructions on the Travis page, I should be committing to the repository.

1

1 Answers

0
votes

The solution is to use before_deploy script and go to your folder.

branches:
  only:
    - master
    - dev
before_install:
  - npm install -g [email protected] [email protected]
script: 
  - npm install
  - ionic cordova build browser
before_deploy:
  - rm .gitignore
  - cd ./platforms/browser/www
deploy:
  provider: azure_web_apps
  verbose: true
  on: dev
  skip_cleanup: true
  overwrite: true