1.1.1 • Published 8 years ago
surge-review v1.1.1
surge-review :zap:
- Deploys a static site to surge.sh
- Adds a comment to your pull request with the new site URL :tada:
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-reviewto deploy tosurge.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 surgeSURGE_TOKEN, token registered with surgeGH_TOKEN, github oauth tokenGH_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 upCI_REPO_NAME, which ==='cdaringe/surge-review', soGH_PROJECT_OWNER=$CI_REPO_NAMEworks
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-reviewwill try to search for the PR number *iff you also provide aGH_PULL_BRANCH
optional
BUILD_IDyour<subdomain>.surge.sh is random by default. add this to make your subdomainsurgereview${BUILD_ID}GHEset to true if publishing to GitHub EnterpriseGH_DOMAINdefault: github.comGH_PROTOCOLdefault: 'https'GH_FOLLOW_REDIRECTSdefault: false