Skip to content

Commit 4798b4e

Browse files
committed
ty
1 parent 98a8a44 commit 4798b4e

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

.github/workflows/update-blog-contents.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ jobs:
1616
- name: Update content and commit
1717
run: |
1818
rm -rf src/content
19-
git clone https://github.com/deviceofchoice/blog.git src/content
20-
LAST_COMMIT_MSG=$(git -C src/content log --oneline -1 | cut -d' ' -f2-)
21-
LAST_AUTHOR_NAME=$(git -C src/content log --format='%an' -1)
22-
LAST_AUTHOR_EMAIL=$(git -C src/content log --format='%ae' -1)
19+
git clone --depth=1 https://github.com/deviceofchoice/blog.git src/content
20+
cd src/content
21+
LAST_COMMIT_MSG=$(git log --format='%s' -1)
22+
LAST_AUTHOR_NAME=$(git log --format='%an' -1)
23+
LAST_AUTHOR_EMAIL=$(git log --format='%ae' -1)
24+
cd ..
25+
echo "Commit message: $LAST_COMMIT_MSG"
26+
echo "Author: $LAST_AUTHOR_NAME <$LAST_AUTHOR_EMAIL>"
2327
rm -rf src/content/.git
2428
git config --global user.name "$LAST_AUTHOR_NAME"
2529
git config --global user.email "$LAST_AUTHOR_EMAIL"

0 commit comments

Comments
 (0)