diff options
| author | blackhao <13851610112@163.com> | 2025-04-28 23:10:16 -0500 |
|---|---|---|
| committer | blackhao <13851610112@163.com> | 2025-04-28 23:10:16 -0500 |
| commit | 1aa82ba951444e985775a55a5bb99e766aa84c31 (patch) | |
| tree | 519d368ea558cbfd362c89f1bf0fb111262fd766 /.github/workflows | |
| parent | b6e9675883f1ccf1011e7a1df898908958022099 (diff) | |
init commit
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/fetch.yml | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/.github/workflows/fetch.yml b/.github/workflows/fetch.yml new file mode 100644 index 0000000..81c2a5b --- /dev/null +++ b/.github/workflows/fetch.yml @@ -0,0 +1,37 @@ +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 |
