Deploy a specific directory to npm using Travis-CI

I want to expand the dist folder after success. But instead, he continues to deploy the entire repository.

What I want to achieve is the same effect:

 npm publish dist 

Here is the related part from my .travis.yml :

 deploy: provider: npm email: sa.alemdar@hotmail.com api_key: secure: MyApiKey skip_cleanup: true file_glob: true file: "dist/**/*" on: tags: true repo: salemdar/angular2-cookie 
+6
source share
1 answer

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

Just make sure you include your package.json in your folder and the skip_cleanup parameter is true.

There is a one-way 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@gmail.com skip_cleanup: true api_key: secure: ##your_secure_key on: branch: master tags: true repo: loveindent/stateful-api-mock-server 
+9
source

All Articles