-
Notifications
You must be signed in to change notification settings - Fork 6
/
circle.yml
34 lines (31 loc) · 1.12 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
machine:
node:
version: 4.5.0
deployment:
production:
branch: master
commands:
# The following few lines set up the heroku-toolbet CLI so we
# can deploy the app. Read more in the CircleCI docs:
# https://circleci.com/docs/1.0/continuous-deployment-with-heroku/
- |
cat >~/.netrc <<EOF
machine api.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
machine git.heroku.com
login $HEROKU_EMAIL
password $HEROKU_TOKEN
EOF
- chmod 600 ~/.netrc # Heroku cli complains about permissions without this
- "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
# Deploy the app to heroku
- git push git@heroku.com:assertible-nodejs-example.git $CIRCLE_SHA1:refs/heads/master
- |
curl -u $ASSERTIBLE_TOKEN: -XPOST --fail "https://assertible.com/deployments" -d'{
"service": "'"${ASSERTIBLE_SERVICE_ID}"'",
"environmentName": "production",
"version": "'"${CIRCLE_SHA1}"'",
"ref": "'"${CIRCLE_SHA1}"'",
"github": true
}'