-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.75 KB
/
hf_space_push.yml
File metadata and controls
52 lines (44 loc) · 1.75 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
49
50
51
52
name: Sync Agent Tide Demo to Hugging Face Space
on:
push:
branches: [main]
tags: [ "*" ]
release:
types: [published, created, edited]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Deploy examples/hf_demo_space to HF Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
rsync -av codetide/agents/tide/ui/.chainlit/ examples/hf_demo_space/.chainlit/
rsync -av codetide/agents/tide/ui/public/ examples/hf_demo_space/public/
cp codetide/agents/tide/ui/chainlit.md examples/hf_demo_space/
cp .gitattributes examples/hf_demo_space
cd examples/hf_demo_space
git lfs install
git init --initial-branch=main
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git remote add origin https://McLoviniTtt:$HF_TOKEN@huggingface.co/spaces/McLoviniTtt/AgentTideDemo
# Set up LFS tracking for your binary files
git lfs track "*.gif"
git lfs track "*.png"
git lfs track "public/*.gif"
git lfs track "public/*.png"
git lfs track "public/avatars/*.png"
# Add .gitattributes first (this tells git which files to track with LFS)
git add .gitattributes
# Now add all files - the binary ones will be handled by LFS
git add .
git commit -m "Deploy Agent Tide Demo to HF Space with LFS"
# Push everything (no filter-branch needed since LFS handles the binary files)
git push --force origin main