Skip to content

Commit

Permalink
Update Rename and Commit Markdown Files.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenPearls authored Aug 28, 2024
1 parent e96885a commit 644baf3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/Rename and Commit Markdown Files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,18 @@ jobs:
dir=$(dirname "$file")
new_filename="$dir/$title.md"
# 기존 파일명을 유지한 채 새 파일명으로 복사
new_dir=$(dirname "$new_filename")
# 파일 이름이 동일한 경우에도 강제로 업데이트
if [ "$file" != "$new_filename" ]; then
echo "Renaming $file to $new_filename" # 복사 작업 로그 출력
mv "$file" "$new_filename" # 새 파일명으로 파일 복사
echo "Renaming $file to $new_filename"
mv "$file" "$new_filename"
else
echo "Updating timestamp for $file" # 파일명이 같으면 로그 출력
echo "Updating timestamp for $file"
touch "$file" # 파일의 타임스탬프를 업데이트
fi
else
echo "No valid title found in $file, skipping." # 유효한 제목이 없으면 로그 출력
echo "No valid title found in $file, skipping."
fi
done
Expand Down

0 comments on commit 644baf3

Please sign in to comment.