Skip to content

Rename and update Markdown files based on h1 titles #34

Rename and update Markdown files based on h1 titles

Rename and update Markdown files based on h1 titles #34

name: Update README with SUMMARY
on:
push:
paths:
- "developLog/SUMMARY.md" # SUMMARY.md 파일이 변경될 λ•Œλ§ˆλ‹€ 트리거
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITBOOKKEY }}
fetch-depth: 0
- name: Update README with SUMMARY content
run: |
# κΈ°μ‘΄ README λ‚΄μš©μ„ λ°±μ—…
cp README.md README_backup.md
# SUMMARY.md의 링크듀에 'developLog/'λ₯Ό μΆ”κ°€
sed -i 's/](programming-lanuage/](developLog\/programming-lanuage/g' developLog/SUMMARY.md
sed -i 's/](spring/](developLog\/spring/g' developLog/SUMMARY.md
sed -i 's/](algorithm-datastructure/](developLog\/algorithm-datastructure/g' developLog/SUMMARY.md
sed -i 's/](book/](developLog\/book/g' developLog/SUMMARY.md
sed -i 's/](ci-cd/](developLog\/ci-cd/g' developLog/SUMMARY.md
sed -i 's/](cs/](developLog\/cs/g' developLog/SUMMARY.md
sed -i 's/](ex/](developLog\/ex/g' developLog/SUMMARY.md
sed -i 's/](memoir/](developLog\/memoir/g' developLog/SUMMARY.md
sed -i 's/](tip-bookmark/](developLog\/tip-bookmark/g' developLog/SUMMARY.md
sed -i 's/](backend/](developLog\/backend/g' developLog/SUMMARY.md
sed -i 's/](trouble-shoting/](developLog\/trouble-shoting/g' developLog/SUMMARY.md
# ν•„μš”ν•œ λ‹€λ₯Έ κ²½λ‘œλ“€μ— λŒ€ν•΄μ„œλ„ μœ„μ™€ 같이 'sed' λͺ…λ Ήμ–΄λ₯Ό μ‚¬μš©ν•˜μ—¬ 'developLog/'λ₯Ό μΆ”κ°€ν•  수 μžˆλ‹€.
# κΈ°μ‘΄ README λ‚΄μš©μ„ μ§€μš°κ³  SUMMARY λ‚΄μš©μœΌλ‘œ ꡐ체
cp developLog/SUMMARY.md README.md
# README 파일의 컀밋
- name: Commit changes
run: |
git add README.md
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Update README with updated SUMMARY.md content"
git push https://${{ secrets.GITBOOKKEY }}@github.com/GoldenPearls/gitBook.git