update data #135
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: update data | |
on: | |
schedule: | |
# Should run at 0:00 and then every 3 hours every day in UTC time. | |
- cron: '0 0,6,12,18 * * *' | |
workflow_dispatch: | |
jobs: | |
run-python: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install Dependencies | |
run: pip install -r requirements.txt | |
- name: Fetch Data | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
run: python fetch_data.py | |
- name: Commit and Push | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Bot" | |
git add data/* | |
git commit -m "data update" | |
git push |