Spaces:
Sleeping
Sleeping
| name: Deploy to Hugging Face Spaces | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Clone Hugging Face Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| git clone https://Jayanthk2004:$HF_TOKEN@huggingface.co/spaces/Jayanthk2004/HireWithAi space_repo | |
| - name: Copy Files | |
| run: | | |
| rsync -av --exclude='.git' ./ space_repo/ | |
| - name: Install Dependencies (optional) | |
| run: | | |
| pip install --upgrade pip | |
| pip install -r space_repo/requirements.txt | |
| - name: Commit & Push to Hugging Face | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| cd space_repo | |
| git add . | |
| git commit -m "Deploy from GitHub Actions" || echo "No changes to commit" | |
| git push https://Jayanthk2004:$HF_TOKEN@huggingface.co/spaces/Jayanthk2004/HireWithAi main | |