Kostya-Lolinger commited on
Commit
fdefb92
Β·
verified Β·
1 Parent(s): 04c948c

Delete .github/workflows/auto-sync.yaml

Browse files
Files changed (1) hide show
  1. .github/workflows/auto-sync.yaml +0 -61
.github/workflows/auto-sync.yaml DELETED
@@ -1,61 +0,0 @@
1
- name: Bi-Directional Sync
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- schedule:
7
- - cron: '*/15 * * * *'
8
- workflow_dispatch:
9
-
10
- jobs:
11
- sync:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- with:
16
- fetch-depth: 0
17
- token: ${{ secrets.GH_AIO_AI }}
18
-
19
- - name: Configure Git
20
- run: |
21
- git config user.name "πŸ€– Auto-Sync"
22
- git config user.email "sync@actions.github.com"
23
-
24
- - name: Setup HF Remote
25
- run: |
26
- git remote add hf https://USER:${{ secrets.HF_TOKEN_ALL_REPOS }}@huggingface.co/spaces/Kostya-Lolinger/dr-lila-therapist 2>/dev/null || true
27
- git remote -v
28
-
29
- - name: Bi-Directional Sync
30
- run: |
31
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
32
- echo "πŸ”„ Starting Bi-Directional Sync"
33
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
34
-
35
- # Fetch from HF
36
- echo "πŸ“₯ Fetching from HuggingFace..."
37
- git fetch hf main 2>/dev/null || echo "⚠️ Fetch warning (might be first run)"
38
-
39
- # Check for HF updates
40
- if git rev-parse hf/main >/dev/null 2>&1; then
41
- if ! git diff --quiet HEAD hf/main; then
42
- echo "πŸ“₯ HF has updates! Merging..."
43
- git merge hf/main --no-edit --allow-unrelated-histories -m "Sync from HF [$(date '+%Y-%m-%d %H:%M')]"
44
- git push origin main
45
- echo "βœ… HF β†’ GitHub: Synced"
46
- else
47
- echo "ℹ️ HF β†’ GitHub: No changes"
48
- fi
49
- fi
50
-
51
- # Push to HF
52
- echo "πŸ“€ Pushing to HuggingFace..."
53
- if git push hf main 2>&1; then
54
- echo "βœ… GitHub β†’ HF: Synced"
55
- else
56
- echo "⚠️ GitHub β†’ HF: Push failed (might be already up-to-date)"
57
- fi
58
-
59
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
60
- echo "βœ… Sync Complete!"
61
- echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"