Skip to content

Daily Download

Daily Download #45

name: Daily Download
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-file:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run download.py
env:
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
run: python -m src.utils.download
- name: Commit and Push changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add data/leetcode_questions.json
if git diff-index --quiet HEAD; then
echo "No changes to commit"
else
git commit -m "Update leetcode_questions.json"
git push
fi