kiwiupover / ember-cli-surge

An ember addon for surge deployments
MIT License
41 stars 8 forks source link

Using `ember-cli-surge` Tavis builds don't pick up on ENV vars #7

Closed mphasize closed 8 years ago

mphasize commented 9 years ago

I just tried to use ember surge on Travis ( following this guide https://surge.sh/help/integrating-with-travis-ci ) to enable automatic deployments on successful builds, but the command is unable to read the ENV vars. (Means that surge is asking me for username/password)

I attempted to fix it, by explicitly passing the ENV from the master process (see https://github.com/mphasize/ember-cli-surge/tree/env-vars) but that's not working either.

Running the surge command directly on Travis, the login details are picked up from SURGE_LOGIN and SURGE_TOKEN without any problems.

Any ideas what could cause this?

kennethormandy commented 9 years ago

Hey! My guess is because this addon is still running Surge v0.12.0. We didn’t add --token and proper environment variable support until v0.13.0, and we are on v0.14.3 now. I opened up a PR that should fix this.

kiwiupover commented 8 years ago

@mphasize I have just added the command ember surge --token which you can use with to get the auth token. Use the token for as an environment variable with travis.

Environment variables:

SURGE_LOGIN: Set it to the email address you use with Surge SURGE_TOKEN: Set it to your login token (get it by doing a surge token)

In your .travis.yml add

after_success:
  - ember surge

I have not tested this myself yet.

kiwiupover commented 8 years ago

This is good to go!