GITBOOK-138: item 14 : Comparable 을 구현할지 고려하라 1차 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' 명령어를 사용하여 '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 | |