1.1.1 • Published 6 years ago

surge-review v1.1.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

surge-review :zap:

Greenkeeper badge

  • Deploys a static site to surge.sh
  • Adds a comment to your pull request with the new site URL :tada:

Codeship Status for cdaringe/surge-review npm.io semantic-release

install

npm install --save-dev surge-review

usage

$ surge-review

see surge-review -h for common options. generally, you will setup your CI server for your project to:

  • export github & surge tokens (SURGE_LOGIN, SURGE_TOKEN, & GH_TOKEN)
  • install this package
  • build your website
  • run surge-review to deploy to surge.sh & post a comment to github

support

  • gitlab is not yet supported. the api calls used are short and sweet. open a PR if you'd like to add it!
  • github enterprise is supported. see config options

configuration

required

  • SURGE_LOGIN, email address registered with surge
  • SURGE_TOKEN, token registered with surge
  • GH_TOKEN, github oauth token
  • GH_PROJECT, your CI should provide this.
  • GH_OWNER, your CI should provide this.
    • GH_PROJECT_OWNER, such as 'cdaringe/surge-review' can be used in exchange for the above two. for instance, codeship offers up CI_REPO_NAME, which === 'cdaringe/surge-review', so GH_PROJECT_OWNER=$CI_REPO_NAME works
  • GH_PULL_REQUEST
    • the number of your PR. this is the number at the end of your PR URL
    • this isn't strictly required--surge-review will try to search for the PR number *iff you also provide a GH_PULL_BRANCH

optional

  • BUILD_ID your <subdomain>.surge.sh is random by default. add this to make your subdomain surgereview${BUILD_ID}
  • GHE set to true if publishing to GitHub Enterprise
  • GH_DOMAIN default: github.com
  • GH_PROTOCOL default: 'https'
  • GH_FOLLOW_REDIRECTS default: false