-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (38 loc) · 1.36 KB
/
Copy pathupdate_data.yml
File metadata and controls
46 lines (38 loc) · 1.36 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
name: Automated Daily Market Data & Factor Analytics Update
on:
schedule:
# Runs at 22:00 UTC (18:00 EST) Monday through Friday after US market close
- cron: '0 22 * * 1-5'
workflow_dispatch: # Allows manual trigger button in GitHub UI
permissions:
contents: write
jobs:
update-market-data:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install yfinance pandas numpy requests
- name: Fetch Latest Market Data & Factor Analytics
run: |
python fetch_data.py
python fetch_factor_data.py
python fetch_force_index_data.py
- name: Commit and Push Updated Data
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add data.json factor_data.json force_index_data.json
if git diff --staged --quiet; then
echo "No new market data or factor changes to commit."
else
git commit -m "auto: refresh market & factor analytics data [skip ci]"
git push
fi