Spaces:
Runtime error
Runtime error
File size: 460 Bytes
c8abb98 c92ce3d c8abb98 c92ce3d c8abb98 c92ce3d c8abb98 c92ce3d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
#!/bin/bash
set -e
if [ -z "$sc4sc_token" ]; then
echo "Error: Environment variable sc4sc_token is not set."
exit 1
fi
SPACE_REPO="sc4sc/editor"
GIT_URL="https://hf_$sc4sc_token@huggingface.co/spaces/$SPACE_REPO"
# Initialize repo if not already
if [ ! -d ".git" ]; then
git init
git remote add origin "$GIT_URL"
fi
git add .
git commit -m "Automated update" || echo "Nothing to commit"
git push origin main
echo "✅ Space successfully updated."
|