flow-pilot / .github /workflows /deploy.yml
DevelopedBy-Siva
deploy to HF
fb38df2
name: Deploy To Hugging Face Space
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to Hugging Face Space
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_SPACE_REPO: ${{ secrets.HF_SPACE_REPO }}
run: |
test -n "$HF_TOKEN"
test -n "$HF_SPACE_REPO"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git remote add hf "https://oauth2:${HF_TOKEN}@huggingface.co/spaces/${HF_SPACE_REPO}"
git push hf HEAD:main --force