See our new Wiki!
This wiki is in legacy mode. Check our new wiki here!
Deployments NPM
NPM using Travis CI
-
Open your Travis CI account and link your repo to the CI.
- Create a token from npm:
https://www.npmjs.com/settings/{USERNAME}/tokens
- Locally on your repo folder, use the following commands to encrypt the token:
gem install travis travis encrypt NPM_TOKEN="{PASTE_YOUR_TOKEN_HERE}" --add
IMPORTANT! If you’re using travis-ci.com (not .org), you’ll need to login before encrypting the token.
In order to use gem you’ll need to install Ruby. This step will create a section env > global on your .travis.yml file (or even a completely new file if you didn’t have one).
-
You’ll need to update .travis.yml to deploy into npm. For example:
deploy: provider: npm email: "youremail@me.com" api_key: $NPM_TOKEN
- For more options please review:
- Here is a complete example with conditional deployments and multiple types of deployments (github and npm): Bootlaterus deployment
Equilaterus (CC-BY) 2018 - 2022.