| 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 | |