Merge pull request #39 from LaurierCS/Pedro/create-post-user-preferences #10
This file contains 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 Migrate | |
on: | |
push: | |
branches: [ "main" ] | |
paths: | |
- "api/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
DEBUG: 0 | |
DB_HOST: ${{ vars.DB_HOST }} | |
DB_PORT: ${{ vars.DB_PORT }} | |
DB_NAME: ${{ vars.DB_NAME }} | |
DB_USER: ${{ vars.DB_USER }} | |
DB_PASS: ${{ secrets.DB_PASS }} | |
defaults: | |
run: | |
working-directory: ./api/optimeet/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Migrate Production DB | |
run: | | |
python manage.py makemigrations | |
python manage.py migrate |