Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Four lecture #1

Merged
merged 15 commits into from
Oct 29, 2022
Prev Previous commit
Next Next commit
add delivery pipeline
  • Loading branch information
renansantosmendes committed Oct 25, 2022
commit d343f8312774c53369732e285aa3054f564d34fe
27 changes: 23 additions & 4 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: FastAPI-GitHub-Heroku

#env:
# HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
# HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
env:
HEROKU_API_TOKEN: ${{secrets.HEROKU_API_TOKEN}}
HEROKU_APP_NAME: ${{secrets.HEROKU_APP_NAME}}

on:
push:
Expand Down Expand Up @@ -33,4 +33,23 @@ jobs:

- name: Test
run: |
python -m pytest test.py
python -m pytest test.py

cd_pipeline:

runs-on: ubuntu-latest
needs: [ci_pipeline]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Deploy to Heroku
run: |
git remote add heroku https://heroku:$HEROKU_API_TOKEN@git.heroku.com/$HEROKU_APP_NAME.git
git push heroku HEAD:main -fn