cron_scrap #266
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: cron_scrap | |
| on: | |
| schedule: | |
| - cron: "0 4 * * *" # every day at 4:00 UTC | |
| workflow_dispatch: # allows manual triggering | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo content | |
| uses: actions/checkout@v4 | |
| - name: setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: install python packages | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r pipeline/requirements.txt | |
| - name: execute py script | |
| run: python pipeline/run.py | |
| - name: commit files | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Action" | |
| git add -A | |
| git diff-index --quiet HEAD || (git commit -a -m "chore: pipeline execution" --allow-empty) | |
| - name: push changes | |
| uses: ad-m/[email protected] | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: main |