feat: add README. #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |