UdasriHasindu commited on
Commit ·
89791b7
1
Parent(s): 89f2004
deploy on HF via gh-actions
Browse files- .github/workflows/deploy.yml +28 -0
.github/workflows/deploy.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Sync to Hugging Face Spaces
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches:
|
| 6 |
+
- main
|
| 7 |
+
# Allows you to trigger this workflow manually from the Actions tab
|
| 8 |
+
workflow_dispatch:
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
deploy-to-space:
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
steps:
|
| 14 |
+
- name: Checkout Repository
|
| 15 |
+
uses: actions/checkout@v4
|
| 16 |
+
with:
|
| 17 |
+
fetch-depth: 0 # Required to grab all commit history
|
| 18 |
+
lfs: true # Tells git to fetch those large LFS objects
|
| 19 |
+
|
| 20 |
+
- name: Push to Hugging Face Hub
|
| 21 |
+
env:
|
| 22 |
+
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 23 |
+
# Update these exact two variables below with your HF handle and Space Name!
|
| 24 |
+
HF_USERNAME: xplorers
|
| 25 |
+
SPACE_NAME: MIS_API
|
| 26 |
+
run: |
|
| 27 |
+
git remote add space https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME
|
| 28 |
+
git push --force space main
|