Browse Source
👷 Add Heroku Deployment
👷 Add Heroku Deployment
pull/6/head
Anthony Quéré
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
33 additions and
0 deletions
-
.circleci/config.yml
-
Procfile
|
|
@ -102,6 +102,29 @@ jobs: |
|
|
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_IMAGE:$CIRCLE_BUILD_NUM |
|
|
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_IMAGE:$CIRCLE_BUILD_NUM |
|
|
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_IMAGE:latest |
|
|
docker push $DOCKER_HUB_USER_ID/$DOCKER_HUB_IMAGE:latest |
|
|
|
|
|
|
|
|
|
|
|
deploy-heroku: |
|
|
|
|
|
<<: *shared-config |
|
|
|
|
|
docker: |
|
|
|
|
|
- image: buildpack-deps:trusty |
|
|
|
|
|
auth: |
|
|
|
|
|
username: *dockerhub-user-id |
|
|
|
|
|
password: *dockerhub-password |
|
|
|
|
|
steps: |
|
|
|
|
|
- checkout |
|
|
|
|
|
- setup_dependencies |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Heroku Deploy |
|
|
|
|
|
command: git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:main |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Smoke Test |
|
|
|
|
|
command: | |
|
|
|
|
|
HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/` |
|
|
|
|
|
if [ "$HTTPCODE" -ne 200 ];then |
|
|
|
|
|
echo "heroku app not responding, failing deploy" |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# --- Workflow definition --- # |
|
|
# --- Workflow definition --- # |
|
|
|
|
|
|
|
|
workflows: |
|
|
workflows: |
|
|
@ -127,3 +150,12 @@ workflows: |
|
|
branches: |
|
|
branches: |
|
|
only: |
|
|
only: |
|
|
- main |
|
|
- main |
|
|
|
|
|
- deploy-heroku: |
|
|
|
|
|
requires: |
|
|
|
|
|
- test |
|
|
|
|
|
- test-e2e |
|
|
|
|
|
- lint |
|
|
|
|
|
filters: |
|
|
|
|
|
branches: |
|
|
|
|
|
only: |
|
|
|
|
|
- main |
|
|
@ -0,0 +1 @@ |
|
|
|
|
|
web: yarn start:prod |