Browse Source

Merge pull request #2 from Anatole-DC/cd_heroku

Add heroku deployement
pull/3/head
Anatole De Chauveron 4 years ago
committed by GitHub
parent
commit
1c51de8711
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 25
      .circleci/config.yml

25
.circleci/config.yml

@ -54,6 +54,23 @@ jobs:
environment: environment:
DATABASE_URL: postgres://$PG_USER:$PG_PASSWORD@localhost:5432/$PG_USER DATABASE_URL: postgres://$PG_USER:$PG_PASSWORD@localhost:5432/$PG_USER
back-deploy-heroku:
docker:
- image: buildpack-deps:trusty
steps:
- checkout
- 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
workflows: workflows:
version: 2 version: 2
build-test-and-lint: build-test-and-lint:
@ -68,3 +85,11 @@ workflows:
- back-test-e2e: - back-test-e2e:
requires: requires:
- build - build
- back-deploy-heroku:
requires:
- build
- lint
- back-test-unit
filters:
branches:
only: main
Loading…
Cancel
Save