soyailabs / .github /workflows /sync_to_hub.yml
SOY NV AI
Update GitHub Actions workflow
2447682
name: Sync to Hugging Face hub
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
# 1. [์ดˆ๊ฐ•๋ ฅ ์ฒญ์†Œ] ์•ˆ๋“œ๋กœ์ด๋“œ, ๋‹ท๋„ท, ํ•˜์Šค์ผˆ ๋“ฑ AI์™€ ๊ด€๋ จ ์—†๋Š” ํˆด์„ ์ „๋ถ€ ์‚ญ์ œ
- name: Maximize Build Space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 2048
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
# 2. ์ฝ”๋“œ ์ฒดํฌ์•„์›ƒ (LFS ํŒŒ์ผ ์ œ์™ธํ•˜๊ณ  ๊ฐ€๋ณ๊ฒŒ ๋ฐ›๊ธฐ)
- uses: actions/checkout@v3
with:
fetch-depth: 1 # ์ „์ฒด ์—ญ์‚ฌ๊ฐ€ ์•„๋‹Œ ์ตœ์‹  ์ฝ”๋“œ๋งŒ ๋ฐ›์Œ (์šฉ๋Ÿ‰ ์ ˆ์•ฝ)
lfs: false # ๊ฑฐ๋Œ€ ํŒŒ์ผ(LFS) ๋‹ค์šด๋กœ๋“œ ๊ธˆ์ง€
# 3. Hugging Face๋กœ ๋ฐฐํฌ
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
# ๊ฐ•์ œ ํ‘ธ์‹œ ์˜ต์…˜(-f) ์ถ”๊ฐ€
git push -f https://wiizm:$HF_TOKEN@huggingface.co/spaces/wiizm/soyailabs main