Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
boyugou authored Dec 20, 2024
1 parent 9205b81 commit 1b17f5b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Update README with Sorted Papers Content
on:
push:
paths:
- 'update_template_or_data/update_paper_list.md' # 监听 update_paper_list.md 文件的更新
- 'update_template_or_data/utils/scripts/sort_by_date.py' # 监听 update_template_or_data/utils/scripts/sort_by_date.py 脚本的更新
- 'update_template_or_data/update_readme_template.md' # 监听 update_template_or_data/utils/scripts/sort_by_date.py 脚本的更新
- 'update_template_or_data/update_paper_list.md' # listen to update_paper_list.md
- 'update_template_or_data/utils/scripts/sort_by_date.py' # listen to update_template_or_data/utils/scripts/sort_by_date.py
- 'update_template_or_data/update_readme_template.md' # listen to update_template_or_data/utils/scripts/sort_by_date.py
- '.github/workflows/main.yml'
# schedule:
# - cron: '0 0 * * *' # 每天定时运行(0点)
# - cron: '0 0 * * *' # everyday

jobs:
update-readme:
Expand Down Expand Up @@ -85,10 +85,8 @@ jobs:
- name: Update temp_readme.md with sorted papers content
run: |
# 读取更新后的 update_template_or_data/update_paper_list.md 内容
CONTENT=$(cat update_template_or_data/update_paper_list.md)
# 使用 sed 插入 content 到 temp_readme.md 的占位符位置
sed -i '/{{insert_all_papers_here}}/{
r /dev/stdin
d
Expand All @@ -99,7 +97,7 @@ jobs:
- name: Overwrite README.md with updated temp_readme.md
run: |
# 覆盖 README.md
# overwrite README.md
cp update_template_or_data/update_readme_template.md README.md
- name: Commit changes
Expand Down

0 comments on commit 1b17f5b

Please sign in to comment.