RyZ
fix: db issue on HF
7baa793
name: Sync to Hugging Face Hub
on:
push:
branches: [test]
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_REPO_NAME: ${{ secrets.HF_REPO_NAME }}
run: |
if [ -z "$HF_TOKEN" ]; then
echo "Error: HF_TOKEN is not set in GitHub Secrets!"
exit 1
fi
if [ -z "$HF_REPO_NAME" ]; then
echo "Error: HF_REPO_NAME is not set in GitHub Secrets!"
exit 1
fi
git push https://git:$HF_TOKEN@huggingface.co/spaces/$HF_REPO_NAME test:main -f || {
echo "::error::Push failed! Check that your HF_TOKEN has WRITE permissions and is correct."
exit 1
}