diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..759a22e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +name: Deploy the code into Heroku + +on: + push: + branches: + - maaster + +jobs: + prod: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: sudo apt install python3 + - name: Login to Heroku Container registry + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + run: heroku container:login + - name: Build and push + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + run: heroku container:push web -a ${{ secrets.HEROKU_APP_NAME }} + - name: Release + env: + HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} + run: heroku container:release web -a ${{ secrets.HEROKU_APP_NAME }} diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..dfe1791 --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: gunicorn --preload --max-requests 500 --max-requests-jitter 5 -t 3 --worker-class gthread --timeout 120 index:app \ No newline at end of file