Commit
·
d220d8d
1
Parent(s):
24c097b
fix: Modify Hugging Face deployment workflow to use static directory
Browse files
.github/workflows/main.yml
CHANGED
@@ -74,12 +74,20 @@ jobs:
|
|
74 |
See LICENSE file for details.
|
75 |
EOL
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
- name: Push to Hugging Face Hub
|
78 |
env:
|
79 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
80 |
run: |
|
81 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
82 |
git config --global user.name "GitHub Actions"
|
83 |
-
git add README.md
|
84 |
git commit -m "Update build and README for Hugging Face Space"
|
85 |
git push https://mantrakp:[email protected]/spaces/mantrakp/sheer main:main
|
|
|
74 |
See LICENSE file for details.
|
75 |
EOL
|
76 |
|
77 |
+
- name: Prepare for Hugging Face
|
78 |
+
run: |
|
79 |
+
# Create a .gitignore specifically for the HF Space
|
80 |
+
echo "node_modules/" > .hugginface.gitignore
|
81 |
+
# Move the dist content to a directory that's not ignored
|
82 |
+
mkdir -p static
|
83 |
+
cp -r dist/* static/
|
84 |
+
|
85 |
- name: Push to Hugging Face Hub
|
86 |
env:
|
87 |
HF_TOKEN: ${{ secrets.HF_TOKEN }}
|
88 |
run: |
|
89 |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
90 |
git config --global user.name "GitHub Actions"
|
91 |
+
git add README.md static/
|
92 |
git commit -m "Update build and README for Hugging Face Space"
|
93 |
git push https://mantrakp:[email protected]/spaces/mantrakp/sheer main:main
|