-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) ยท 1.57 KB
/
sentiment.yml
File metadata and controls
59 lines (49 loc) ยท 1.57 KB
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
52
53
54
55
56
57
58
59
name: Sentiment Pipeline
on:
schedule:
- cron: "0 */12 * * *" # every 12 hours utc
workflow_dispatch: # ์๋ ์คํ ๋ฒํผ
jobs:
run-sentiment:
runs-on: ubuntu-latest
steps:
# 1. ์ ์ฅ์ ์ฒดํฌ์์
- name: Checkout code
uses: actions/checkout@v3
# 2. Python ์ค์น
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
# 3. pip ์บ์
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-v2-${{ hashFiles('piplist.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# 4. ๋ชจ๋ธ ์บ์ (SaveModel ๋๋ ํ ๋ฆฌ)
- name: Cache model files
uses: actions/cache@v3
with:
path: SaveModel/
key: ${{ runner.os }}-sentiment-model-v4 # ๋ชจ๋ธ v4
restore-keys: |
${{ runner.os }}-sentiment-model-
# 5. ์์กด์ฑ ์ค์น
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r piplist.txt
# 6. ํ๊ฒฝ ๋ณ์ ์ธํ
- name: Set environment variables
run: |
echo "SUPABASE_URL=$SUPABASE_URL" >> $GITHUB_ENV
echo "SUPABASE_KEY=$SUPABASE_KEY" >> $GITHUB_ENV
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
# 7. ์คํฌ๋ฆฝํธ ์คํ (main.py ์์์ ํ์์ ๋ชจ๋ธ ๋ค์ด๋ก๋)
- name: Run sentiment script
run: python main.py