Update API Data Daily #45
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 API Data Daily | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 馃摜 Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: 馃悕 Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: 馃摝 Install dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| - name: 馃殌 Run crawler | |
| run: | | |
| python main.py | |
| - name: 馃摑 Commit & Push changes | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git add . | |
| git diff --cached --quiet || git commit -m "馃 Daily update API data" | |
| git push |