Jonell Magallanes
Create main.yml
aa9417c unverified
name: Deploy to Hugging Face Space
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code (full history)
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Migrate existing binaries to Git LFS
run: |
git lfs install
git lfs migrate import --include="*.jpg,*.jpeg,*.png,*.gif,*.mp3,*.wav,*.flac,*.mp4,*.mkv,*.zip,*.tar,*.gz,*.ttf,*.otf,*.woff,*.woff2,*.pt,*.safetensors" --include-ref=refs/heads/main
git add .gitattributes
git commit -m "Migrate binary files to Git LFS" || true
- name: Push to Hugging Face
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git remote add space https://user:$HF_TOKEN@huggingface.co/spaces/Jonell01/Testing-file
git push --force space main