-
Notifications
You must be signed in to change notification settings - Fork 14
32 lines (30 loc) · 1.19 KB
/
main.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
name: Sync with Hugging Face
on:
push:
branches:
- master
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0 # Ensure full clone to avoid shallow update issues
- name: Install Git LFS
run: sudo apt-get install git-lfs
- name: Install Hugging Face Hub
run: pip install huggingface_hub
- name: Configure Git Credentials
run: |
git config --global credential.helper store
echo "https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co" > ~/.git-credentials
- name: Sync to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
run: |
git lfs install
huggingface-cli login --token $HF_TOKEN --add-to-git-credential
git remote add huggingface https://huggingface.co/${{ secrets.HF_USERNAME }}/LongRoPE
git push huggingface master:main --force