Skip to content

Generate Metrics

Generate Metrics #229

Workflow file for this run

# 工作流名称
name: Generate Metrics
# 工作流触发时机, see: https://docs.github.com/zh/actions/using-workflows/triggering-a-workflow
# 触发条件修改为: 当 main 分支有 push 操作 || 每天 0 点
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
# 作业, see: https://docs.github.com/zh/actions/using-jobs/using-jobs-in-a-workflow
jobs:
# 生成统计图, see: https://github.com/lowlighter/metrics
github-jujin:
runs-on: ubuntu-latest
permissions:
contents: write
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: "1856432524239421"
# 使用 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"