Accidentally change the branch to trigger auto push #77
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Heroku | |
on: | |
push: | |
branches: | |
- HW-166-add-tests-to-docker-container # Set this to the branch you want to trigger deployment | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
HEROKU_EMAIL: ${{ secrets.HEROKU_EMAIL }} | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
HEROKU_APP_NAME_CLIENT: ${{ secrets.HEROKU_APP_NAME_CLIENT }} | |
HEROKU_APP_NAME_SERVER: ${{ secrets.HEROKU_APP_NAME_SERVER }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Heroku Container Registry | |
run: | | |
echo "$HEROKU_API_KEY" | docker login --username="$HEROKU_EMAIL" --password-stdin registry.heroku.com | |
- name: Build and Push Client Image to Heroku Container Registry | |
run: | | |
docker build -t registry.heroku.com/${{ secrets.HEROKU_APP_NAME_CLIENT }}/web -f code/client/Dockerfile.production ./code/client | |
docker push registry.heroku.com/${{ secrets.HEROKU_APP_NAME_CLIENT }}/web | |
- name: Build and Push Server Image to Heroku Container Registry | |
run: | | |
docker build -t registry.heroku.com/${{ secrets.HEROKU_APP_NAME_SERVER }}/web -f code/server/Dockerfile.production ./code/server | |
docker push registry.heroku.com/${{ secrets.HEROKU_APP_NAME_SERVER }}/web | |
- name: Release Client on Heroku | |
run: | | |
heroku container:release web --app ${{ secrets.HEROKU_APP_NAME_CLIENT }} | |
- name: Release Server on Heroku | |
run: | | |
heroku container:release web --app ${{ secrets.HEROKU_APP_NAME_SERVER }} |