Skip to content

Instantly share code, notes, and snippets.

@elbuo8
Created October 27, 2016 03:37
Show Gist options
  • Save elbuo8/cb59df063ca05251dac870b8dd29037c to your computer and use it in GitHub Desktop.
Save elbuo8/cb59df063ca05251dac870b8dd29037c to your computer and use it in GitHub Desktop.
zeit deployment
$ cd your/app
$ now deploy -t $ZEIT_TOKEN --docker
$ DEPLOYMENT_INFO=$(curl -H "Authorization: Bearer $ZEIT_TOKEN" https://api.zeit.co/now/deployments | json -c "console.log(JSON.stringify(this.deployments.filter((e) => {return e.name === 'NAME OF YOUR APP'}).reduce((a, b) => {return a.created > b.created ? a : b})))")
$ echo "running simple check"
$ curl -i -L $(echo $DEPLOYMENT_INFO | json url)
$ now alias $(echo $DEPLOYMENT_INFO | json uid) YOURDOMAIN.com -t $ZEIT_TOKEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment