my-app / deploy.yml
ttttttt1111's picture
Create deploy.yml
8e6145f unverified
Raw
History Blame Contribute Delete
732 Bytes
name: Deploy to Hugging Face
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
HF_SPACE_NAME: ${{ secrets.HF_SPACE_NAME }}
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "github-actions"
git remote add hf https://${HF_USERNAME}:${HF_TOKEN}@huggingface.co/spaces/${HF_USERNAME}/${HF_SPACE_NAME}
git push hf main --force