Skip to content

What do they say abou deploying on Friday? #24

What do they say abou deploying on Friday?

What do they say abou deploying on Friday? #24

Workflow file for this run

name: Deploy to Heroku
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
env:
DEBUG: 0
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
OIDC_RP_CLIENT_ID: ${{ secrets.OIDC_RP_CLIENT_ID }}
OIDC_RP_CLIENT_SECRET: ${{ secrets.OIDC_RP_CLIENT_SECRET }}
OIDC_OP_AUTHORIZATION_ENDPOINT: ${{ secrets.OIDC_OP_AUTHORIZATION_ENDPOINT }}
OIDC_OP_TOKEN_ENDPOINT: ${{ secrets.OIDC_OP_TOKEN_ENDPOINT }}
OIDC_OP_USERINFO_ENDPOINT: ${{ secrets.OIDC_OP_USERINFO_ENDPOINT }}
OIDC_OP_JWKS_ENDPOINT: ${{ secrets.OIDC_OP_JWKS_ENDPOINT }}
OIDC_RP_SIGN_ALGO: ${{ secrets.OIDC_RP_SIGN_ALGO }}
AFT_API_KEY: ${{ secrets.AFT_API_KEY }}
AFT_PORT: ${{ secrets.AFT_PORT }}
AFT_SHORT_CODE: ${{ secrets.AFT_SHORT_CODE }}
AFT_USERNAME: ${{ secrets.AFT_USERNAME }}
services:
postgres:
image: 'postgres:alpine'
env:
POSTGRES_USER: ${{ secrets.DB_USER }}
POSTGRES_PASSWORD: ${{ secrets.DB_PASSWORD }}
POSTGRES_DB: ${{ secrets.DB_NAME }}
volumes:
- 'postgres_data:/var/lib/postgresql/data'
ports:
- '5432:5432'
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11.8
uses: actions/setup-python@v5
with:
python-version: '3.11.8'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run migrations
run: |
python manage.py makemigrations --empty customers
python manage.py makemigrations --empty orders
python manage.py migrate
- name: Run Tests
run: |
python manage.py test
- name: Push to server and deploy
uses: akhileshns/heroku-deploy@v3.13.15
with:
heroku_api_key: '${{ secrets.HEROKU_API_KEY }}'
heroku_app_name: '${{ secrets.HEROKU_APP_NAME }}'
heroku_email: '${{ secrets.HEROKU_EMAIL_ADDRESS }}'