Skip to content

Commit

Permalink
create Github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pgorecki committed Nov 3, 2023
1 parent c7cfaba commit 834fd0b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
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

0 comments on commit 834fd0b

Please sign in to comment.