FinGraph / .github /workflows /daily_pipeline.yml
dev-yuje's picture
feat: implement Neo4j Client fallback auth, add disabled daily cron pipeline and update checklist
64ad66f
name: Daily GraphRAG Update Pipeline
on:
# 토큰 μš”κΈˆ λ°œμƒ 우렀 및 λΉ„μš© μ ˆκ°μ„ μœ„ν•΄ 맀일 μžλ™ μ‹€ν–‰λ˜λŠ” μŠ€μΌ€μ€„(Cron)은 μ™„λ²½νžˆ 주석 처리(λΉ„ν™œμ„±ν™”)ν•©λ‹ˆλ‹€.
# schedule:
# # 맀일 μƒˆλ²½ 1μ‹œ(KST) = UTC 16:00
# - cron: '0 16 * * *'
# μˆ˜λ™ μ‹€ν–‰λ§Œ ν—ˆμš© (κ°œλ°œμžλ‹˜κ»˜μ„œ ν•„μš” μ‹œ GitHub Actions μ›Ή UIμ—μ„œ 직접 가동)
workflow_dispatch:
permissions:
contents: write
jobs:
update-pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout Source Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Scrapping & Neo4j Incremental Load
env:
NEO4J_URI: ${{ secrets.NEO4J_URI }}
NEO4J_CLIENT_ID: ${{ secrets.NEO4J_CLIENT_ID }}
NEO4J_CLIENT_SECRET: ${{ secrets.NEO4J_CLIENT_SECRET }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
python3 src/graphBuilder/scrapping/finScrapping.py
python3 src/graphBuilder/neo4j/finGraph.py
- name: Commit and Push New Excel Data
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
# μƒˆλ‘œ μˆ˜μ§‘λ˜μ–΄ μƒμ„±λœ μ—‘μ…€ νŒŒμΌλ“€μ„ μŠ€ν…Œμ΄μ§•
git add src/graphBuilder/scrapping/Articles_*.xlsx
# 변경사항 쑴재 μ—¬λΆ€ 확인 ν›„ 컀밋 및 ν‘Έμ‹œ
if git diff --cached --quiet; then
echo "No new news articles found to update today."
else
git commit -m "chore: auto-update crawled news articles $(date +'%Y-%m-%d')"
git push origin main
fi