[Silver III] Title: 1로 만들기, Time: 120 ms, Memory: 18084 KB -BaekjoonHub #85
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: Update README | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # 전체 커밋 로그 가져오기 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.9" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt || echo "No requirements file" | |
| - name: Run update script | |
| run: | | |
| python ./update_readme.py || echo "Script failed" | |
| - name: Commit and push changes | |
| run: | | |
| git config --local user.name "GitHub Actions" | |
| git config --local user.email "actions@github.com" | |
| git add README.md | |
| git commit -m "Update README" || echo "Nothing to commit" | |
| git push |