Skip to content

Commit

Permalink
feat: 动态生成文档最近提交记录
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz committed Nov 22, 2024
1 parent 490bd66 commit 58e2d98
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
run: |
bash .github/workflows/generate-contributors.sh
- name: generate changelog
run: |
bash .github/workflows/generate-changelog.sh
- name: Build website
run: |
make build
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/generate-changelog.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash
echo "---" > docs/docs/changelog.md
echo "slug: '/docs/changelog'" >> docs/docs/changelog.md
echo "title: '文档最近更新'" >> docs/docs/changelog.md
echo "sidebar_position: 99" >> docs/docs/changelog.md
echo "---" >> docs/docs/changelog.md
echo "" >> docs/docs/changelog.md
# 获取最近提交记录
git log -n 100 --pretty=format:"- [%ad](https://github.com/gogf/gf-site/commit/%H) - [%an] - %s" --abbrev-commit --no-merges --date=format:'%m-%d %H:%M' >> docs/docs/changelog.md
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go.work.sum
node_modules
.docusaurus
output

docs/docs/changelog.md

# Dependencies
/node_modules
Expand Down

0 comments on commit 58e2d98

Please sign in to comment.