6060 with :
6161 python-version : ' 3.11'
6262
63+ - name : Create logs and cache directories
64+ working-directory : backend/scraping
65+ run : |
66+ mkdir -p logs
67+ mkdir -p .insta_cache
68+
6369 - name : Cache pip
6470 uses : actions/cache@v4
6571 with :
@@ -71,21 +77,25 @@ jobs:
7177 - name : Cache Instaloader session
7278 uses : actions/cache@v4
7379 with :
74- path : .insta_cache
75- key : ${{ runner.os }}-instaloader-session-${{ secrets.USERNAME }}
80+ path : backend/scraping/ .insta_cache
81+ key : ${{ runner.os }}-instaloader-session-${{ hashFiles('backend/requirements.txt') }}
7682 restore-keys : |
7783 ${{ runner.os }}-instaloader-session-
7884
85+ - name : Install system GDAL
86+ run : |
87+ sudo apt-get update
88+ sudo apt-get install -y gdal-bin libgdal-dev
89+ if [ -f /usr/lib/x86_64-linux-gnu/libgdal.so ]; then
90+ echo "GDAL_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/libgdal.so" >> $GITHUB_ENV
91+ fi
92+
7993 - name : Install dependencies
8094 working-directory : backend
8195 run : |
8296 pip install --upgrade pip setuptools wheel
8397 pip install -r requirements.txt
8498
85- - name : Create logs directory
86- working-directory : backend/scraping
87- run : mkdir -p logs
88-
8999 - name : Run scraper
90100 if : github.event_name == 'schedule' || github.event.inputs.run_scraper == 'true'
91101 working-directory : backend/scraping
@@ -116,7 +126,7 @@ jobs:
116126 git config --global user.email 'github-actions[bot]@users.noreply.github.com'
117127 git add frontend/src/data/staticData.ts
118128 git commit -m "chore: update static data from DB" || echo "No changes to commit"
119- git push --force
129+ git pull --rebase && git push
120130
121131 - name : Send newsletter to subscribers
122132 if : github.event_name == 'schedule' || github.event.inputs.send_newsletter == 'true'
0 commit comments