File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,13 +29,22 @@ jobs:
2929 restore-keys : |
3030 ${{ runner.os }}-pip-
3131
32- # 4. 의존성 설치
32+ # 4. 모델 캐시 (SaveModel 디렉토리)
33+ - name : Cache model files
34+ uses : actions/cache@v3
35+ with :
36+ path : SaveModel/
37+ key : ${{ runner.os }}-sentiment-model-v1
38+ restore-keys : |
39+ ${{ runner.os }}-sentiment-model-
40+
41+ # 5. 의존성 설치
3342 - name : Install dependencies
3443 run : |
3544 python -m pip install --upgrade pip
3645 pip install -r piplist.txt
3746
38- # 5 . 환경 변수 세팅
47+ # 6 . 환경 변수 세팅
3948 - name : Set environment variables
4049 run : |
4150 echo "SUPABASE_URL=$SUPABASE_URL" >> $GITHUB_ENV
4453 SUPABASE_URL : ${{ secrets.SUPABASE_URL }}
4554 SUPABASE_KEY : ${{ secrets.SUPABASE_KEY }}
4655
47- # 6. 스크립트 실행
56+ # 7. 모델 없을 때만 Supabase에서 다운로드
57+ - name : Download model if not cached
58+ run : |
59+ if [ ! -f SaveModel/upstock_sentiment_model.keras ]; then
60+ echo "Downloading model from Supabase..."
61+ python scripts/download_model.py
62+ else
63+ echo "Model already cached, skip download"
64+ fi
65+
66+ # 8. 스크립트 실행
4867 - name : Run sentiment script
4968 run : python main.py
You can’t perform that action at this time.
0 commit comments