- 在
README中任意位置添加标志位
<!-- posts start -->
<!-- posts end -->- 设置工作流
jobs:
juejin-posts:
runs-on: ubuntu-latest
steps:
# 使用 actions/checkout 拉取仓库, see: https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v3
# 使用 KunLunXu-CC/juejin-posts-action 生成文章列表,
# see: https://github.com/KunLunXu-CC/juejin-posts-action
- name: Append Juejin Posts List🔧
uses: KunLunXu-CC/juejin-posts-action@main
with:
user_id: "4459274891717223"
# 使用 EndBug/add-and-commit 提交代码, see: https://github.com/EndBug/add-and-commit
- name: Push to GitHub
uses: EndBug/add-and-commit@v9
with:
branch: main
default_author: github_actions
message: 'juejin-posts'- 安装依赖
npm i- 执行 test 脚本
npm run test-
执行结果: 执行
npm run test后将在上文注入目录 -
修改版本号
-
编译
npm run build- 提交代码