diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 93312a2..3ebee0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,9 +3,9 @@ name: Update README with Sorted Papers Content on: push: paths: - - 'add_paper_here.md' # 监听 add_paper_here.md 文件的更新 + - 'update_paper_list.md' # 监听 update_paper_list.md 文件的更新 - 'sort_by_date.py' # 监听 sort_by_date.py 脚本的更新 - - 'change_readme_here.md' # 监听 sort_by_date.py 脚本的更新 + - 'update_readme_template.md' # 监听 sort_by_date.py 脚本的更新 # schedule: # - cron: '0 0 * * *' # 每天定时运行(0点) @@ -31,26 +31,26 @@ jobs: - name: Update temp_readme.md with sorted papers content run: | - # 读取更新后的 add_paper_here.md 内容 - CONTENT=$(cat add_paper_here.md) + # 读取更新后的 update_paper_list.md 内容 + CONTENT=$(cat update_paper_list.md) # 使用 sed 插入 content 到 temp_readme.md 的占位符位置 sed -i '/{{insert_content_here}}/{ r /dev/stdin d - }' change_readme_here.md <<< "$CONTENT" + }' update_readme_template.md <<< "$CONTENT" - name: Overwrite README.md with updated temp_readme.md run: | # 覆盖 README.md - cp change_readme_here.md README.md + cp update_readme_template.md README.md - name: Commit changes run: | git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" - git add README.md add_paper_here.md - git commit -m "Update README with sorted content from add_paper_here.md" + git add README.md update_paper_list.md + git commit -m "Update README with sorted content from update_paper_list.md" git push env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/add_paper_here.md b/update_paper_list.md similarity index 100% rename from add_paper_here.md rename to update_paper_list.md diff --git a/change_readme_here.md b/update_readme_template.md similarity index 100% rename from change_readme_here.md rename to update_readme_template.md