RentCalc-validation/RentCalc.com
1
1name: Sync to Hugging Face Hub2 3on:4 push:5 branches: [main]6 workflow_dispatch:7 8jobs:9 sync-to-hub:10 runs-on: ubuntu-latest11 steps:12 - name: Checkout code13 uses: actions/checkout@v314 with:15 fetch-depth: 016 lfs: true17 18 - name: Push to hub19 env:20 HF_TOKEN: ${{ secrets.HF_TOKEN }}21 run: |22 # 1. Clear brand logo in the runner before staged23 rm -rf public/brand/logo.png24 25 # 2. Setup a detached clean folder26 mkdir ../temp_sync27 cp -R . ../temp_sync/28 cd ../temp_sync29 rm -rf .git30 31 # 3. Init fresh git32 git init33 git config user.email "fb-sync@github.com"34 git config user.name "GitHub Sync Action"35 36 # 4. Add all files and commit37 git add .38 git commit -m "HF Deploy: Clean build from GitHub Actions"39 40 # 5. Push this single commit to Hugging Face41 git push --force https://x:$HF_TOKEN@huggingface.co/spaces/RentCalc-validation/RentCalc.com HEAD:main42 