Skip to content

Sentiment Pipeline

Sentiment Pipeline #23

Workflow file for this run

name: Sentiment Pipeline
on:
schedule:
- cron: "0 15-23,0-14 * * *" # korean time
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-${{ hashFiles('piplist.txt') }}
restore-keys: |
${{ runner.os }}-pip-
# 4. ์˜์กด์„ฑ ์„ค์น˜
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r piplist.txt
# 5. ํ™˜๊ฒฝ ๋ณ€์ˆ˜ ์„ธํŒ…
- 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 }}
# 6. ์Šคํฌ๋ฆฝํŠธ ์‹คํ–‰
- name: Run sentiment script
run: python upstock-sentiment.py