Skip to content

update workflow

update workflow #6

Workflow file for this run

name: Test and Deploy to Heroku
on:
push:
branches:
- main
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run make test
- name: Log in to Heroku Container Registry
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: heroku container:login
- name: Build the Docker image
run: make build
- name: Push Docker image to Heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
run: make heroku