blob: 81c2a5b2348856f0ed71e9654bc3603db0c3d59e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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
|