name: Sync to Hugging Face Space on: push: branches: [main] paths: - 'hf_space/**' workflow_dispatch: jobs: sync: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - name: Push to Hugging Face env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | cd hf_space git init git config user.name "GitHub Action" git config user.email "action@github.com" git add . git commit -m "Deploy to Hugging Face Space" git push --force https://NurseCitizenDeveloper:$HF_TOKEN@huggingface.co/spaces/NurseCitizenDeveloper/relational-ai-4-nursing HEAD:main