Sync Codetree Subtree #2
This file contains hidden or 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: Sync Codetree Subtree | |
| on: | |
| schedule: | |
| - cron: '0 16 * * *' # 매일 KST 1시 (UTC 16시) | |
| workflow_dispatch: # 수동 실행 버튼도 추가됨 | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout algorithm repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # 전체 히스토리를 받아야 subtree pull이 정상 작동함 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set Git config | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Add codetree remote | |
| run: | | |
| git remote add codetree https://github.com/junest66/codetree-solutions.git | |
| git fetch codetree | |
| - name: Pull codetree subtree | |
| run: | | |
| git subtree pull --prefix=codetree codetree main -m "chore(subtree): sync codetree with latest changes" | |
| - name: Push updated subtree | |
| run: | | |
| git push origin main |