-
Notifications
You must be signed in to change notification settings - Fork 126
48 lines (39 loc) · 1.17 KB
/
crawl-docs.yml
File metadata and controls
48 lines (39 loc) · 1.17 KB
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
38
39
40
41
42
43
44
45
46
47
48
name: Crawl CloudBase API Docs
on:
schedule:
- cron: "0 2 * * *" # 每天 UTC 02:00 (北京时间 10:00)
workflow_dispatch: # 手动触发
permissions:
contents: write # 允许推送代码
jobs:
crawl:
runs-on: ubuntu-latest
steps:
- name: Checkout target branch
uses: actions/checkout@v4
with:
ref: chore/pure_doc_skill
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Crawl docs
run: npx tsx scripts/crawl-tcb-docs.ts
- name: Generate action list
run: npx tsx scripts/generate-actionlist.ts
- name: Commit and push
run: |
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: 🔄 update API docs and action-list"
git push
fi