Skip to content

Made some changes to get variables working correctly #83

Made some changes to get variables working correctly

Made some changes to get variables working correctly #83

Workflow file for this run

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/peak-performance/web -f code/client/Dockerfile.production ./code
docker push registry.heroku.com/peak-performance/web
- name: Build and Push Server Image to Heroku Container Registry
run: |
docker build -t registry.heroku.com/peak-performance/web -f code/server/Dockerfile.production ./code
docker push registry.heroku.com/peak-performance/web
- name: Release Client on Heroku
run: |
heroku container:release web --app peak-performance
- name: Release Server on Heroku
run: |
heroku container:release web --app peak-performance