Skip to content

Fetch Daily Categories #121

Fetch Daily Categories

Fetch Daily Categories #121

name: Fetch Daily Categories
on:
schedule: # UTC 03:00 ≈ 北京时间上午 11:00
- cron: "0 3 * * *"
workflow_dispatch: # 允许手动触发
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install project
run: |
pip install --upgrade pip
pip install .
- name: Generate today’s category CSV
run: python scripts/fetch_daily_categories.py
# 把结果保存为构建产物,避免反复提交代码
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: categories-${{ github.run_number }}
path: data/categories/