Skip to content

weekly-update

weekly-update #178

name: weekly-update
'on':
schedule:
- cron: '7 7 * * 1'
workflow_dispatch:
permissions:
contents: write
jobs:
run-all:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
- name: setup python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.14"
- name: Install dependencies
run: uv sync
- name: Patch bblocks packages
run: |
sed -i 's/coco_logger = coco.logging.getLogger()/#coco_logger = coco.logging.getLogger()/' .venv/lib/python*/site-packages/bblocks_data_importers/utilities.py
sed -i 's/coco_logger.setLevel(logging.CRITICAL)/#coco_logger.setLevel(logging.CRITICAL)/' .venv/lib/python*/site-packages/bblocks_data_importers/utilities.py
sed -i 's/weo = WorldEconomicOutlook().load_data/weo = WorldEconomicOutlook(year=2025, release=1).load_data/' .venv/lib/python*/site-packages/bblocks/dataframe_tools/common.py
- name: Run weekly update
env:
IPC_API: ${{ secrets.IPC_API }}
run: uv run python update_weekly.py
- name: Save changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Actions [bot]"
git add .
git commit -m "Weekly database update"
- name: push changes
uses: ad-m/github-push-action@v1.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy download folder to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: charts_download # The folder the action should deploy.
git-config-name: "GitHub Actions [bot]"
git-config-email: "action@github.com"