-
Notifications
You must be signed in to change notification settings - Fork 601
51 lines (44 loc) · 1.81 KB
/
static.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Check collectstatic
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- name: Cache Python dependencies
uses: actions/cache@v4
env:
cache-name: pythondotorg-cache-pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('requirements/requirements.txt', 'requirements/*-requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-
${{ runner.os }}-${{ github.job }}-
${{ runner.os }}-
- name: Install Python dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements/requirements.txt -r requirements/prod-requirements.txt
- name: Debug Information
run: |
pwd
ls -R
cat app/manage.py
cat app/pydotorg/settings/static.py
grep -n "INSTALLED_APPS" app/pydotorg/settings/base.py
- name: Run collectstatic
run: |
export PYTHONPATH=$PYTHONPATH:${{ github.workspace }}
cd ${{ github.workspace }}
echo "PYTHONPATH: $PYTHONPATH"
echo "Current directory: $(pwd)"
ls -la
python -c "import sys; print('Python path:', sys.path)"
python -c "import django; print('Django version:', django.__version__)"
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.static python -c "from django.conf import settings; print('INSTALLED_APPS:', settings.INSTALLED_APPS)"
DJANGO_SETTINGS_MODULE=app.pydotorg.settings.static python app/manage.py collectstatic --noinput