-
Notifications
You must be signed in to change notification settings - Fork 13
45 lines (37 loc) · 1.07 KB
/
update_about.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
42
43
44
45
name: Update About Page
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- 'scripts/update_about.py'
workflow_dispatch:
jobs:
build:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout repo content
uses: actions/checkout@v4 # checkout the repository content to github runner
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Python packages
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Execute Python script
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python scripts/update_about.py
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
add: 'content/about/index.zh-cn.md'
default_author: github_actions
message: 'ci: update about page'