|
|
@ -26,7 +26,16 @@ jobs: |
|
|
- run: |
|
|
- run: |
|
|
name: Heroku deploy |
|
|
name: Heroku deploy |
|
|
command: | |
|
|
command: | |
|
|
|
|
|
git config --global push.default matching |
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_PROJECT_NAME.git main |
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_PROJECT_NAME.git main |
|
|
|
|
|
- run: |
|
|
|
|
|
name: Smoke test |
|
|
|
|
|
command: | |
|
|
|
|
|
HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_PROJECT_NAME.herokuapp.com/api/articles` |
|
|
|
|
|
if [ "$HTTPCODE" -ne 200 ];then |
|
|
|
|
|
echo "heroku app not responding, failing deploy" |
|
|
|
|
|
exit 1 |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
test: |
|
|
test: |
|
|
docker: |
|
|
docker: |
|
|
@ -106,17 +115,9 @@ workflows: |
|
|
requires: |
|
|
requires: |
|
|
- build_docker |
|
|
- build_docker |
|
|
context: Docker |
|
|
context: Docker |
|
|
filters: |
|
|
|
|
|
branches: |
|
|
|
|
|
only: |
|
|
|
|
|
- main |
|
|
|
|
|
- deploy_heroku: |
|
|
- deploy_heroku: |
|
|
requires: |
|
|
requires: |
|
|
# - test |
|
|
# - test |
|
|
- build |
|
|
- build |
|
|
context: heroku |
|
|
context: heroku |
|
|
filters: |
|
|
|
|
|
branches: |
|
|
|
|
|
only: |
|
|
|
|
|
- main |
|
|
|
|
|
|
|
|
|