Stock-Tool/.github/workflows/cache_refresh.yml

36 lines
952 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: Refresh Analyst Cache
on:
schedule:
- cron: '0 7 * * 1-5' # 02:00 AM EST (07:00 UTC), MonFri only
workflow_dispatch: # allow manual trigger from the GitHub Actions UI
jobs:
refresh:
runs-on: ubuntu-latest
timeout-minutes: 90 # analyst phase ~50 min + news phase ~6 min
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install \
yfinance>=0.2.36 \
pandas>=2.0.0 \
requests>=2.28.0 \
vaderSentiment>=3.3.2
- name: Run cache builder
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_SERVICE_KEY: ${{ secrets.SUPABASE_SERVICE_KEY }}
run: python cache_builder.py