Skip to content

Instantly share code, notes, and snippets.

@ctala
Created March 6, 2020 13:27
Show Gist options
  • Save ctala/21c659fb3a537238b683cf734f9d4a81 to your computer and use it in GitHub Desktop.
Save ctala/21c659fb3a537238b683cf734f9d4a81 to your computer and use it in GitHub Desktop.
TravisCI with GitHUB Package Repository (Only Pre Install and Install ) that generates .npmrc with github token
language: node_js
node_js:
- 10
cache:
directories:
- node_modules
before_install:
- echo "INSTALL GLOBAL DEPENDENCIES"
- npm install -g serverless
- echo "BEFORE INSTALL - ADD PRIVATE REPO"
- npm config set registry https://npm.pkg.github.com/OWNER
- echo "GENERATING AUTH"
- echo //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN > .npmrc
install:
- echo "INSTALL"
- npm install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment