Spaces:
Runtime error
Runtime error
Commit
·
ef2dcf1
1
Parent(s):
5ff486a
Update main.yml
Browse files- .github/workflows/main.yml +17 -6
.github/workflows/main.yml
CHANGED
|
@@ -1,20 +1,31 @@
|
|
| 1 |
name: Sync to Hugging Face hub
|
| 2 |
on:
|
| 3 |
push:
|
| 4 |
-
branches: [main]
|
| 5 |
|
| 6 |
-
# to run this workflow manually from the Actions tab
|
| 7 |
workflow_dispatch:
|
| 8 |
|
| 9 |
jobs:
|
| 10 |
sync-to-hub:
|
| 11 |
runs-on: ubuntu-latest
|
| 12 |
steps:
|
|
|
|
| 13 |
- uses: actions/checkout@v3
|
| 14 |
with:
|
| 15 |
-
fetch-depth: 0
|
| 16 |
-
lfs: true
|
| 17 |
-
|
|
|
|
| 18 |
env:
|
|
|
|
|
|
|
|
|
|
| 19 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 20 |
-
run:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
name: Sync to Hugging Face hub
|
| 2 |
on:
|
| 3 |
push:
|
| 4 |
+
branches: [main] # Trigger on pushes to the main branch
|
| 5 |
|
| 6 |
+
# Allows you to run this workflow manually from the Actions tab on GitHub
|
| 7 |
workflow_dispatch:
|
| 8 |
|
| 9 |
jobs:
|
| 10 |
sync-to-hub:
|
| 11 |
runs-on: ubuntu-latest
|
| 12 |
steps:
|
| 13 |
+
# Checkout the repository, including LFS files
|
| 14 |
- uses: actions/checkout@v3
|
| 15 |
with:
|
| 16 |
+
fetch-depth: 0 # Fetch all history for all branches and tags
|
| 17 |
+
lfs: true # Checkout LFS files
|
| 18 |
+
|
| 19 |
+
- name: Push to Hugging Face Hub
|
| 20 |
env:
|
| 21 |
+
# Use the HF_TOKEN secret stored in GitHub repository settings
|
| 22 |
+
# Ensure you have created a secret named HF_TOKEN in your GitHub repo settings
|
| 23 |
+
# with a Hugging Face WRITE token (https://huggingface.co/settings/tokens)
|
| 24 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
| 25 |
+
run: |
|
| 26 |
+
echo "Pushing to Hugging Face Space: siddharth786s1/email-pii-classifier-siddharth786s1"
|
| 27 |
+
# Force-push the current branch (main) to the main branch of the Hugging Face Space repository.
|
| 28 |
+
# Replace 'siddharth786s1' if your HF username or space owner is different.
|
| 29 |
+
# Replace 'email-pii-classifier-siddharth786s1' if your space name is different.
|
| 30 |
+
git push --force https://siddharth786s1:[email protected]/spaces/siddharth786s1/email-pii-classifier-siddharth786s1 main
|
| 31 |
+
echo "Push command executed."
|