Skip to content

Fetch Realtime Trends #311

Fetch Realtime Trends

Fetch Realtime Trends #311

Workflow file for this run

name: Fetch Realtime Trends
on:
schedule:
- cron: '7 */6 * * *' # 6시간마다 갱신. 필요하면 workflow_dispatch로 즉시 실행.
workflow_dispatch: # 수동 실행 버튼 허용
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
fetch-and-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Run fetch script
run: python scripts/fetch_trends.py
- name: Commit and Push changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add blog/data/trends.json
git commit -m "chore: auto-update trending searches [skip ci]" || exit 0
git push