File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync LeetCode Solutions
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 0 * * *' # runs daily at midnight UTC
6+ workflow_dispatch : # allow manual run
7+
8+ jobs :
9+ sync :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout repo
13+ uses : actions/checkout@v3
14+
15+ - name : Set up Python
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : ' 3.x'
19+
20+ - name : Install dependencies
21+ run : pip install git+https://github.com/kaiiyer/leetcode-sync.git
22+
23+ - name : Run sync
24+ env :
25+ LEETCODE_SESSION : ${{ secrets.LEETCODE_SESSION }}
26+ CSRFTOKEN : ${{ secrets.CSRFTOKEN }}
27+ run : leetcode-sync --username SAITEJA LUKKA --repo-path .
28+
29+ - name : Commit changes
30+ run : |
31+ git config --global user.name "GitHub Action"
32+ git config --global user.email "[email protected] " 33+ git add .
34+ git commit -m "Sync LeetCode solutions" || echo "No changes to commit"
35+ git push
You can’t perform that action at this time.
0 commit comments