JSPM

  • Created
  • Published
  • Downloads 15769
  • Score
    100M100P100Q6678F
  • License MIT

run a deployment script only once in the test matrix

Package Exports

  • travis-deploy-once

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (travis-deploy-once) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

travis-deploy-once

You want to test as many node versions as possible and deploy if all of them pass. This module allows you do just that in a script running in Travis' after_success hook.

npm install --save travis-deploy-once
const deployOnce = require('travis-deploy-once')

try {
  var result = await deployOnce({
    token: 'asd' // GitHub oAuth token, defaults to process.env.GH_TOKEN
  })
} catch (err) {
  // something went wrong, and err will tell you what
}

if (result === true) deployMyThing()
if (result === false) console.log('Some job(s) failed')
if (result === null) console.log('Did not run inside the first job of the build matrix')