Skip to content

Sync LeetCode Solutions #1

Sync LeetCode Solutions

Sync LeetCode Solutions #1

Workflow file for this run

name: Sync LeetCode Solutions
on:
schedule:
- cron: '0 0 * * *' # runs daily at midnight UTC
workflow_dispatch: # allow manual run
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install git+https://github.com/kaiiyer/leetcode-sync.git
- name: Run sync
env:
LEETCODE_SESSION: ${{ secrets.LEETCODE_SESSION }}
CSRFTOKEN: ${{ secrets.CSRFTOKEN }}
run: leetcode-sync --username SAITEJA LUKKA --repo-path .
- name: Commit changes
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git add .
git commit -m "Sync LeetCode solutions" || echo "No changes to commit"
git push