surge-review
v1.1.1
Published
Deploy a static site to surge from CI & post the site to your pull request automatically :tada:
Downloads
4
Readme
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-review
to 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_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 aGH_PULL_BRANCH
optional
BUILD_ID
your<subdomain>
.surge.sh is random by default. add this to make your subdomains
urgereview${BUILD_ID}
GHE
set to true if publishing to GitHub EnterpriseGH_DOMAIN
default: github.comGH_PROTOCOL
default: 'https'GH_FOLLOW_REDIRECTS
default: false