-
Notifications
You must be signed in to change notification settings - Fork 269
46 lines (40 loc) · 1.32 KB
/
sync-widgets-demo.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
39
40
41
42
43
44
45
46
name: Sync Widgets Demo
on:
push:
branches:
- main
paths:
- "packages/widgets/**"
- "packages/tasks/**"
- "package.json"
- "pnpm-lock.yaml"
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
name: "Clone"
with:
path: "local-demo"
- name: "Clone remote demo"
run: |
git clone https://huggingface.co/spaces/huggingfacejs/inference-widgets
# Set huggingface token in git credentials
git config --global user.name machineuser
git config --global user.email [email protected]
echo "machine huggingface.co login hf password ${{ secrets.HF_DEMO_TOKEN }}" >> ~/.netrc
- name: "Copy demo files"
run: |
rm -rf inference-widgets/packages
mkdir -p inference-widgets/packages
cp -r local-demo/packages/widgets inference-widgets/packages
cp -r local-demo/packages/tasks inference-widgets/packages
cp local-demo/package.json inference-widgets/package.json
cp local-demo/pnpm-lock.yaml inference-widgets/pnpm-lock.yaml
- name: "Commit and push"
run: |
cd inference-widgets
git add .
git commit -m "Sync widgets demo"
git push