new ch
Browse files1 unmodified line234567891011121314151617181920211 unmodified lineon:push:branches: [main] # Trigger on push to main branchworkflow_dispatch: # Allow manual runjobs:sync-to-hub:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3with:fetch-depth: 0lfs: true # Enable LFS support- name: Push to Hugging Faceenv:HF_TOKEN: ${{ secrets.HF_TOKEN }}run: |git remote add space https://jebin2:$HF_TOKEN@huggingface.co/spaces/jebin2/comic-panel-extractor || truegit push --force space main1 unmodified line23456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960611 unmodified lineon:push:branches: [main]workflow_dispatch:jobs:sync-to-hub:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3with:fetch-depth: 0lfs: true- name: Configure Gitrun: |git config --global user.email "github-actions[bot]@users.noreply.github.com"git config --global user.name "github-actions[bot]"- name: Commit any uncommitted changesrun: |git add -Agit diff --staged --quiet || git commit -m "Save working directory before LFS migration"- name: Configure Git LFSrun: |git lfs install- name: Fetch all LFS objectsrun: |git lfs fetch --allgit lfs checkout- name: Migrate existing files to LFSrun: |git lfs migrate import --include="*.jpg,*.jpeg,*.png,*.gif,*.mp3,*.mp4,*.wav,*.ttf,*.db,sliding_puzzle,stockfish/stockfish-ubuntu-x86-64-avx2" --everything- name: Track binary files with LFSrun: |git lfs track "*.jpg" "*.jpeg" "*.png" "*.gif" "*.mp3" "*.mp4" "*.wav" "*.ttf" "*.db"git lfs track "sliding_puzzle"git lfs track "stockfish/stockfish-ubuntu-x86-64-avx2"git add .gitattributesgit diff --staged --quiet || git commit -m "Configure Git LFS tracking"- name: Fetch LFS objects after migrationrun: |git lfs fetch --allgit lfs pull- name: Push to Hugging Face Spaceenv:HF_TOKEN: ${{ secrets.HF_TOKEN }}run: |git remote remove space 2>/dev/null || truegit remote add space https://jebin2:${HF_TOKEN}@huggingface.co/spaces/jebin2/comic-panel-extractorgit lfs push --all space maingit push --force space main
.github/workflows/sync-to-hf.yml+46-6