Pull and commit data #7
This file contains 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: Pull and commit data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 8 * * * | |
jobs: | |
crawler: | |
name: Crawler | |
runs-on: ubuntu-latest | |
env: | |
AZURE_SUBSCRIPTION_KEY: ${{secrets.AZURE_SUBSCRIPTION_KEY}} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: poetry | |
- run: poetry install | |
- run: poetry run python crawler | |
- name: Commit and push changes | |
run: | | |
git config --global user.email "luz.liting@gmail.com" | |
git config --global user.name "litingyes" | |
git add . | |
git commit -m "chore(github-actions): update data at ${date}" | |
git push origin main |