-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (37 loc) · 1.12 KB
/
update-page.yaml
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
name: update page
on:
workflow_dispatch:
push:
branches:
- master # restrict to master branch in order to avoid infinite loop
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0
- name: clone kernel
uses: actions/checkout@v4
with:
repository: torvalds/linux
path: linux
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- run: pip install GitPython requests tqdm
- run: python3 ./linux-statistic.py --path ./linux
- name: Commit changes to gh-pages and push
run: |
git checkout --orphan tmp
git rm --cached -rf .
rm .gitignore
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add index.html result.json detail/
git commit -m "ci[bot]: update page automatically"
git push -f origin tmp:gh-pages