-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.43 KB
/
sync_leetcode.yml
File metadata and controls
43 lines (34 loc) · 1.43 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
# Name of the workflow
name: Sync Leetcode
# Trigger conditions for the workflow
on:
# Allows manual triggering of the workflow from the GitHub UI
workflow_dispatch:
# Schedule the workflow to run automatically at a specific time
schedule:
# Cron syntax to run the workflow at 8:00 AM every Saturday
- cron: '0 8 * * 6'
# Define the jobs to be executed in the workflow
jobs:
# Name of the job (can be anything, here it's named "build")
build:
# Specifies the type of machine to run the job on (latest Ubuntu version)
runs-on: ubuntu-latest
# List of steps to execute in the job
steps:
# Step 1: Sync LeetCode data
- name: Check GitHub Token
run: echo "Token exists? ${{ github.token }}"
- name: Sync
uses: joshcai/leetcode-sync@v1.5
with:
# GitHub token for authentication (automatically provided by GitHub)
github-token: ${{ secrets.GITHUB_TOKEN }}
# LeetCode CSRF token (stored as a secret in the repository)
leetcode-csrf-token: ${{ secrets.LEETCODE_CSRF_TOKEN }}
# LeetCode session token (stored as a secret in the repository)
leetcode-session: ${{ secrets.LEETCODE_SESSION }}
# Enable verbose logging for debugging purposes
verbose: true
# Custom commit message header for synced changes
commit-header: '[LeetCode Sync]'