Skip to content

Commit

Permalink
Try to fix collectstatic and prod deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
stariluz committed Jul 27, 2024
1 parent 13d21c2 commit 6426edb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/poetry-django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
AWS_DB_PASSWORD: ${{ secrets.AWS_DB_PASSWORD }}
AWS_DB_HOST: ${{ secrets.AWS_DB_HOST }}
AWS_DB_PORT: ${{ secrets.AWS_DB_PORT }}
run: poetry run python manage.py collectstatic --noinput
run: poetry run python manage.py collectstatic --noinput --clear

- name: Archive static files
uses: actions/upload-artifact@v4
Expand Down
16 changes: 8 additions & 8 deletions myFacegram/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@

PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
STATIC_URL = '/static/'
# STATIC_URL = '/static/'

STATICFILES_DIRS = [
(BASE_DIR / 'static'),
]
# STATICFILES_DIRS = [
# (BASE_DIR / 'static'),
# ]

STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
# STATICFILES_FINDERS = [
# 'django.contrib.staticfiles.finders.FileSystemFinder',
# 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# ]

SRF_COOKIE_SECURE=True
LOGIN_URL = '/users/login/'
Expand Down
16 changes: 8 additions & 8 deletions myFacegram/settings_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,14 @@
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
STATIC_URL = 'https://stariluz.github.io/myFacegram/'
STATICFILES_DIRS = [
(BASE_DIR / 'static'),
]

STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
# STATICFILES_DIRS = [
# (BASE_DIR / 'static'),
# ]

# STATICFILES_FINDERS = [
# 'django.contrib.staticfiles.finders.FileSystemFinder',
# 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# ]

SRF_COOKIE_SECURE=True
LOGIN_URL = '/users/login/'
Expand Down

0 comments on commit 6426edb

Please sign in to comment.