[Gold IV] Title: ๋น์ฐ, Time: 104 ms, Memory: 3080 KB -BaekjoonHub #163
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: Move New Folder to LeetCode | |
| # on: | |
| # push: | |
| # branches: [main] | |
| # paths: | |
| # - '*/**' # ๋ชจ๋ ์ต์์ ๋๋ ํ ๋ฆฌ ๋ด์ ๋ณ๊ฒฝ ์ฌํญ์ ๋ํด ๋ฐ์ํฉ๋๋ค. | |
| # jobs: | |
| # move-folder: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - uses: actions/checkout@v2 | |
| # with: | |
| # fetch-depth: '0' # ๋ชจ๋ ์ปค๋ฐ์ ๊ฐ์ ธ์ต๋๋ค. | |
| # - name: Move new folder to LeetCode | |
| # run: | | |
| # # ๋ง์ง๋ง ์ปค๋ฐ์์ ์ถ๊ฐ๋ ๋ชจ๋ ํญ๋ชฉ์ ์ฐพ์ต๋๋ค. | |
| # ADDED_ITEMS=$(git diff --diff-filter=A --name-only ${{ github.event.before }} ${{ github.sha }}) | |
| # echo "Added items: $ADDED_ITEMS" | |
| # # ์ถ๊ฐ๋ ํญ๋ชฉ๋ค ์ค ์ต์์ ๋๋ ํ ๋ฆฌ๋ง ์ฐพ์ LeetCode ํด๋๋ก ์ด๋ํฉ๋๋ค. | |
| # for ITEM in $ADDED_ITEMS; do | |
| # if [[ -d $ITEM && $ITEM != "LeetCode/" && $ITEM != "LeetCode/*" ]]; then | |
| # # ์ต์์ ๋๋ ํ ๋ฆฌ๋ฅผ LeetCode ํด๋๋ก ์ด๋ํฉ๋๋ค. | |
| # mv $ITEM LeetCode/ | |
| # # ๋ณ๊ฒฝ ์ฌํญ์ ์ปค๋ฐํฉ๋๋ค. | |
| # git add . | |
| # git commit -m "Move $ITEM to LeetCode directory" | |
| # fi | |
| # done | |
| # # ์ด๋๋ ํญ๋ชฉ์ด ์์ผ๋ฉด ํธ์ํฉ๋๋ค. | |
| # if git status | grep -q 'Changes to be committed'; then | |
| # git push origin main | |
| # else | |
| # echo "No changes to push" | |
| # fi | |
| # env: | |
| # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |