name: Fetch Bilibili Replies on: schedule: # 每 2 小时跑一次;UTC → 中国时间 +8 => 正好本地每整奇数小时 - cron: '0 */2 * * *' workflow_dispatch: # 手动触发 jobs: fetch: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install deps run: | python -m pip install -r requirements.txt - name: Fetch & update Excel env: BILIBILI_UID: 382384081 # ⚠️或改为 secrets run: | python fetch_update.py - name: Push changes if: ${{ github.ref == 'refs/heads/main' }} env: GH_TOKEN: ${{ secrets.GH_PAT }} # 你的 Personal Access Token run: | git config --global url."https://${GH_TOKEN}@github.com/".insteadOf "https://github.com/" git push --quiet