name: Sync to Hugging Face Space on: push: branches: - main jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout GitHub repo uses: actions/checkout@v3 - name: Clone Hugging Face Space run: | git clone https://mukiibi:${{ secrets.HF_TOKEN_RON }}@huggingface.co/spaces/Sebunya/AskXeno hf_space - name: Sync files run: | rsync -av --delete --exclude ".git" ./ hf_space/ --ignore-errors --exclude "hf_space" - name: Commit & push run: | cd hf_space git config user.email "actions@github.com" git config user.name "github-actions" git add . git commit -m "Sync from GitHub" || echo "No changes to commit" git push origin main