fix: prevent arraylake key overwrite in multi-user scenarios #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync to Hugging Face | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Fetch all LFS objects | |
| run: git lfs pull | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Push to Hugging Face | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| pip install -U huggingface_hub | |
| python -c " | |
| from huggingface_hub import HfApi | |
| import os | |
| api = HfApi() | |
| api.upload_folder( | |
| folder_path='.', | |
| repo_id='dmpantiu/Eurus', | |
| repo_type='space', | |
| token=os.environ['HF_TOKEN'], | |
| ignore_patterns=['.git/*', '.github/*'], | |
| ) | |
| print('Upload complete') | |
| " |