-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.72 KB
/
hf_space_push.yml
File metadata and controls
42 lines (39 loc) · 1.72 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
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: |
cp -r codetide/agents/tide/ui/.chainlit/* examples/hf_demo_space/
cp -r codetide/agents/tide/ui/public/* examples/hf_demo_space/
cp -r codetide/agents/tide/ui/chainlit.md examples/hf_demo_space/
cd examples/hf_demo_space
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
git add .
git commit -m "Deploy Agent Tide Demo to HF Space"y
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch agent-tide-demo.gif" HEAD
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch avatars/agent_tide.png" HEAD
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch codetide-banner.png" HEAD
git filter-branch --force --index-filter "git rm --cached --ignore-unmatch logo_dark.png" HEAD
git for-each-ref --format="delete %(refname)" refs/original | git update-ref --stdin
git reflog expire --expire=now --all
git gc --prune=now
git push --force --all