From d6bd1ce697fdecebc4c4211bdeb4b505cff1c32d Mon Sep 17 00:00:00 2001 From: Cell <1024@lruihao.cn> Date: Sat, 18 Jan 2025 22:07:56 +0800 Subject: [PATCH] :wrench: Chore: use hugo-fixit/action-component-list to generate content --- .github/workflows/fixit-component-list.yml | 28 ++++++++++++++++++++++ README.md | 4 ++-- README.zh-cn.md | 4 ++-- 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/fixit-component-list.yml diff --git a/.github/workflows/fixit-component-list.yml b/.github/workflows/fixit-component-list.yml new file mode 100644 index 00000000..04bfec95 --- /dev/null +++ b/.github/workflows/fixit-component-list.yml @@ -0,0 +1,28 @@ +name: Generate hugo-fixit component list +on: + schedule: # Run workflow automatically + - cron: '0 0 * * *' # Runs every day at 00:00 UTC + workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly +permissions: + contents: write # To write the generated contents to the readme + +jobs: + generate-component-list: + name: Update this repo's README with the list of hugo-fixit theme components + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Generate hugo-fixit component list + uses: hugo-fixit/action-component-list@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + comment_tag_name: HUGO_FIXIT_COMPONENTS + readme_path: 'README.md,README.zh-cn.md' + template: "- [{$repo.name}]({$repo.html_url})\\\n {$repo.description}" + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: ':memo: Docs: update hugo-fixit component list' + commit_author: 'github-actions[bot] ' diff --git a/README.md b/README.md index 4dba0770..0c1dc086 100644 --- a/README.md +++ b/README.md @@ -196,9 +196,9 @@ The FixIt theme balances **simplicity** and **extensibility** with extra [Hugo t
Click to view. - + - +
diff --git a/README.zh-cn.md b/README.zh-cn.md index b37affa0..65620c7b 100644 --- a/README.zh-cn.md +++ b/README.zh-cn.md @@ -200,9 +200,9 @@ FixIt 主题旨在在**简洁性**和**可扩展性**之间取得平衡。为此
点击展开 - + - +