|
|
|
@ -50,17 +50,12 @@ jobs: |
|
|
|
- checkout |
|
|
|
- run: |
|
|
|
name: Deploy main to heroku |
|
|
|
command: | |
|
|
|
git config --global push.default matching |
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git main |
|
|
|
command: |
|
|
|
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git HEAD:master |
|
|
|
- run: |
|
|
|
name: Smoke test |
|
|
|
command: | |
|
|
|
HTTPCODE=`curl -s -o /dev/null -w "%{http_code}" https://$HEROKU_APP_NAME.herokuapp.com/api/articles` |
|
|
|
if [ "$HTTPCODE" -ne 200 ];then |
|
|
|
echo "heroku app not responding, failing deploy" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
./test_heroku.sh |
|
|
|
docker-build-push: |
|
|
|
working_directory: /dockerapp |
|
|
|
docker: |
|
|
|
@ -91,9 +86,7 @@ workflows: |
|
|
|
context: Heroku |
|
|
|
requires: |
|
|
|
- build |
|
|
|
# - test (We don't require test as there's a problem with them atm) |
|
|
|
- docker-build-push: |
|
|
|
context: Docker |
|
|
|
requires: |
|
|
|
- build |
|
|
|
# - test (We don't require test as there's a problem with them atm) |