Skip to content

Deploy to GitHub Pages #73

Deploy to GitHub Pages

Deploy to GitHub Pages #73

Workflow file for this run

name: Deploy to GitHub Pages
on:
# Run daily at 7am UTC (adjust to your timezone)
schedule:
- cron: '0 7 * * *'
# Run on push to main
push:
branches: [main]
# Allow manual trigger
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Fetch and export Fed Monitor data
env:
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
run: |
echo "=== Fetching Fed Monitor data ==="
python scripts/fetch_data.py --monitor fed
echo "=== Exporting Fed Monitor JSON ==="
python scripts/export_json.py --monitor fed
- name: Fetch and export BOJ Monitor data
env:
FRED_API_KEY: ${{ secrets.FRED_API_KEY }}
run: |
echo "=== Fetching BOJ Monitor data ==="
python scripts/fetch_data.py --monitor boj
echo "=== Exporting BOJ Monitor JSON ==="
python scripts/export_json.py --monitor boj
- name: Verify output files
run: |
echo "=== Static files ==="
ls -la static/
echo "=== Fed data preview ==="
head -20 static/fed-data.json || echo "fed-data.json not found"
echo "=== BOJ data preview ==="
head -20 static/boj-data.json || echo "boj-data.json not found"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: static/
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4