forked from ChatGPTNextWeb/NextChat
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.08 KB
/
pdm.yml
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
name: Sync to ChatGPT-Next-Web-PDM-2
# 允许手动触发工作流
on:
schedule:
- cron: '0 0 * * *' # 定时触发(例如,每天凌晨3点)
workflow_dispatch: # 手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout source repository
uses: actions/checkout@v2
with:
repository: leetreeyoung/ChatGPT-Next-Web
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 1
path: source-repo
- name: Checkout target repository
uses: actions/checkout@v2
with:
repository: leetreeyoung/ChatGPT-Next-Web-PDM-2
token: ${{secrets.TOKEN }}
ref: main
path: target-repo
fetch-depth: 1
- name: Sync changes
run: |
rsync -av --delete --exclude='.git' source-repo/ target-repo/
cd target-repo
git config --global user.email "[email protected]"
git config --global user.name "leetreeyoung"
git add .
git commit -m "Sync changes from ChatGPT-Next-Web" || echo "No changes to commit"
git push origin main