Fix 403 permission error by removing broken permission_required decor… #12
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: Run Django Migrations | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| migrate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
| - name: Run migrations and ensure templates | |
| env: | |
| DATABASE_URL: ${{ secrets.DATABASE_URL }} | |
| DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }} | |
| # Add other required secrets (EMAIL, SENTRY_DSN, etc.) as needed | |
| run: | | |
| echo "Running migrations" | |
| python manage.py migrate --noinput | |
| echo "Ensuring default message templates" | |
| python manage.py ensure_default_templates |