File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : LeetCode Sync
2+
3+ on :
4+ workflow_dispatch :
5+
6+ schedule :
7+ - cron : " 0 */6 * * *" # Every 6 hours
8+
9+ jobs :
10+ sync :
11+
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+
16+ - name : Checkout repository
17+ uses : actions/checkout@v4
18+
19+ - name : Set up Python
20+ uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.13"
23+
24+ - name : Install dependencies
25+ run : |
26+ python -m pip install --upgrade pip
27+ pip install -r requirements.txt
28+
29+ - name : Run LeetCode Sync
30+ env :
31+ LEETCODE_SESSION : ${{ secrets.LEETCODE_SESSION }}
32+ CSRF_TOKEN : ${{ secrets.CSRF_TOKEN }}
33+ LEETCODE_USERNAME : ${{ secrets.LEETCODE_USERNAME }}
34+ GITHUB_USERNAME : ${{ secrets.GITHUB_USERNAME }}
35+ GITHUB_EMAIL : ${{ secrets.GITHUB_EMAIL }}
36+
37+ run : |
38+ python main.py
39+
40+ - name : Push changes
41+ run : |
42+ git config --global user.name "${{ secrets.GITHUB_USERNAME }}"
43+ git config --global user.email "${{ secrets.GITHUB_EMAIL }}"
44+
45+ git push
You can’t perform that action at this time.
0 commit comments