Spaces:
Sleeping
Sleeping
CI: auto‑deploy to HF Space
Browse files
.github/workflows/deploy.yaml
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: Deploy to Hugging Face Space
|
2 |
+
|
3 |
+
on:
|
4 |
+
push:
|
5 |
+
branches: [ main ] # deploy every push to main
|
6 |
+
|
7 |
+
jobs:
|
8 |
+
deploy:
|
9 |
+
runs-on: ubuntu-latest
|
10 |
+
steps:
|
11 |
+
- uses: actions/checkout@v4
|
12 |
+
|
13 |
+
- name: Push repo to HF Space
|
14 |
+
env:
|
15 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
16 |
+
run: |
|
17 |
+
git config --global user.email "ci@github"
|
18 |
+
git config --global user.name "github-ci"
|
19 |
+
# add or update the HF remote
|
20 |
+
git remote add hf https://[email protected]/spaces/MooseML/homo-lumo-gap-predictor || \
|
21 |
+
git remote set-url hf https://[email protected]/spaces/MooseML/homo-lumo-gap-predictor
|
22 |
+
# force-push the current branch to Space
|
23 |
+
git push -f hf HEAD:main
|