P2SAMAPA commited on
Commit
71e1973
·
unverified ·
1 Parent(s): ce5a772

Update daily_data_update.yml

Browse files
.github/workflows/daily_data_update.yml CHANGED
@@ -1 +1,39 @@
 
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Daily Data Update
2
 
3
+ on:
4
+ schedule:
5
+ - cron: "0 2 * * 1-5" # 2:00 AM UTC, Mon–Fri (markets close ~21:00 UTC)
6
+ workflow_dispatch: # Allow manual trigger
7
+
8
+ jobs:
9
+ update:
10
+ runs-on: ubuntu-latest
11
+ timeout-minutes: 30
12
+
13
+ steps:
14
+ - name: Checkout repo
15
+ uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.11"
21
+ cache: "pip"
22
+
23
+ - name: Install dependencies
24
+ run: pip install -r requirements.txt
25
+
26
+ - name: Run daily update (incremental data + prediction)
27
+ env:
28
+ FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
29
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
30
+ HF_DATASET_REPO: ${{ secrets.HF_DATASET_REPO }}
31
+ run: python daily_update.py
32
+
33
+ - name: Commit latest_prediction.json to repo
34
+ run: |
35
+ git config user.name "github-actions[bot]"
36
+ git config user.email "github-actions[bot]@users.noreply.github.com"
37
+ git add latest_prediction.json evaluation_results.json || true
38
+ git diff --cached --quiet || git commit -m "[auto] Daily prediction update $(date -u +%Y-%m-%d)"
39
+ git push || true