-
Notifications
You must be signed in to change notification settings - Fork 1.3k
38 lines (37 loc) · 898 Bytes
/
sync.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
name: Sync endpoint
on:
push:
branches:
- sync
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Restore cache
id: file-restore
uses: actions/cache/restore@v3
with:
path: |
sync/endpoint.txt
key: endpoint-${{ github.run_id }}
restore-keys: |
endpoint-
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: run
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
ENDPOINTS: ${{ vars.ENDPOINTS }}
run: cd sync && pip install huggingface_hub && python sync.py && cat endpoint.txt
- name: Save cache
id: file-save
uses: actions/cache/save@v3
with:
path: |
sync/endpoint.txt
key: endpoint-${{ github.run_id }}
restore-keys: |
endpoint-