From dd93adcf3fc0b7ab5fe39c5011be61a455ba9c53 Mon Sep 17 00:00:00 2001 From: Adrien-Ba Date: Sat, 15 Jan 2022 12:21:03 +0100 Subject: [PATCH] Add Back Deploy to Heroku Step :construction_worker: -Add back deploy to heroku --- .circleci/config.yml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b85420b..6184f78 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,6 +54,23 @@ jobs: environment: DATABASE_URL: postgres://psqluer:psqlpassword@localhost:5432/psqluer + back-deploy-heroku: + docker: + - image: buildpack-deps:trusty + steps: + - checkout + - run: + name: Heroku Deploy + command: git push https://heroku:$HEROKU_KEY@git.heroku.com/protected-mesa-89495.git HEAD:main + - run: + name: Smoke Test + command: | + HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://protected-mesa-89495.herokuapp.com/` + if [ "$HTTPCODE" -ne 200 ];then + echo "heroku app not responding, failing deploy" + exit 1 + fi + workflows: version: 2 build-test-and-lint: @@ -67,4 +84,13 @@ workflows: - build - lint: requires: - - build \ No newline at end of file + - build + - back-deploy-heroku: + requires: + - build + - lint + - back-test-e2e + - back-test-unit + filters: + branches: + only: main \ No newline at end of file