-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (35 loc) · 1.04 KB
/
Copy pathsync.yml
File metadata and controls
48 lines (35 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: LeetCode Sync
on:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *" # Every 6 hours
permissions:
contents: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run LeetCode Sync
env:
LEETCODE_SESSION: ${{ secrets.LEETCODE_SESSION }}
CSRF_TOKEN: ${{ secrets.CSRF_TOKEN }}
LEETCODE_USERNAME: ${{ secrets.LEETCODE_USERNAME }}
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
run: |
python main.py
- name: Push changes
run: |
git config --global user.name "${{ secrets.GIT_USERNAME }}"
git config --global user.email "${{ secrets.GIT_EMAIL }}"
git push