Files
FXandRatesDashboard/.github/workflows/update.yml
T
2026-04-09 20:52:53 +01:00

47 lines
1.1 KiB
YAML

name: Generate FX Radar Data
on:
schedule:
- cron: '30 7 * * 1-5'
- cron: '0 12 * * 1-5'
- cron: '0 15 * * 1-5'
- cron: '30 20 * * 1-5'
workflow_dispatch:
push:
paths:
- 'generate.py'
permissions:
contents: write
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run data generation
env:
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
FINNHUB_API_KEY: ${{ secrets.FINNHUB_API_KEY }}
run: python generate.py
- name: Commit and push data.json
run: |
git config user.name "FX Radar Bot"
git config user.email "bot@fxradar.app"
git add data.json
git diff --staged --quiet || git commit -m "📊 Update market data $(date -u '+%Y-%m-%d %H:%M UTC')"
git push