name: Deploy to Hugging Face Spaces on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true steps: - name: Checkout Repository uses: actions/checkout@v5 - name: Deploy to Hugging Face Space env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | git config --global user.email "github-actions@github.com" git config --global user.name "github-actions" git clone https://mdsalmon159:$HF_TOKEN@huggingface.co/spaces/mdsalmon159/hrchatbot hf-space rsync -av \ --exclude='.git' \ --exclude='data/manual.pdf' \ ./ hf-space/ cd hf-space git add . git commit -m "Auto deploy from GitHub Actions" || echo "No changes to commit" git push