I want to deploy the dist
folder after success. But instead, it keeps deploying the whole repository.
What I want to achieve is the same effect with:
npm publish dist
Here is the related part from my .travis.yml
:
deploy:
provider: npm
email: [email protected]
api_key:
secure: MyApiKey
skip_cleanup: true
file_glob: true
file: "dist/**/*"
on:
tags: true
repo: salemdar/angular2-cookie
The solution is to use before_deploy script and go to your folder.
Just make sure you have include your package.json in your folder and skip_cleanup option to true.
There is a fonctional solution:
language: node_js
node_js:
- '5'
- '4'
after_success:
- npm run build #make a dist folder
before_deploy:
- cd dist
deploy:
provider: npm
email: [email protected]
skip_cleanup: true
api_key:
secure: ##your_secure_key
on:
branch: master
tags: true
repo: loveindent/stateful-api-mock-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With