Skip to content

Update LeetCode Stats #127

Update LeetCode Stats

Update LeetCode Stats #127

Workflow file for this run

name: Update LeetCode Stats
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight UTC
workflow_dispatch: # Allows manual triggering
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests beautifulsoup4
- name: Run update script
run: python update_readme.py
- name: Commit and push changes
run: |
git config --global user.name "github-actions"
git config --global user.email "actions@github.com"
git add README.md
git commit -m "Updated LeetCode stats in README.md" || echo "No changes to commit"
git push