Merge pull request #37 from akirachix/develop #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Django Deployment CI | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python environment | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Install Heroku CLI | |
run: curl https://cli-assets.heroku.com/install.sh | sh | |
- name: Login to Heroku | |
run: heroku container:login | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
- name: Set up Git remote for Heroku | |
run: | | |
git remote -v | |
git remote add heroku https://git.heroku.com/zeno-backend.git || echo "Heroku remote already exists" | |
- name: Deploy to Heroku | |
uses: akhileshns/heroku-deploy@v3.13.15 | |
with: | |
heroku_api_key: ${{ secrets.HEROKU_API_KEY }} | |
heroku_app_name: "zeno-ai" | |
heroku_email: ${{ secrets.HEROKU_EMAIL }} |