
Upload from GitHub Actions: Use Python 3.12 in all environments (uv, Docker, CI) and upgrade packages
a61d2b3
verified
name: Upload to Hugging Face | |
on: | |
push: | |
branches: [ main, master ] | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install huggingface_hub | |
- name: Upload to Hugging Face | |
env: | |
HUGGINGFACE_ACCESS_TOKEN: ${{ secrets.HUGGINGFACE_ACCESS_TOKEN }} | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
python -c ' | |
from huggingface_hub import upload_folder | |
import os | |
upload_folder( | |
folder_path=".", | |
path_in_repo="/", | |
repo_id="fair-forward/evals-for-every-language", | |
repo_type="space", | |
token=os.environ["HUGGINGFACE_ACCESS_TOKEN"], | |
commit_message="Upload from GitHub Actions: " + os.environ["COMMIT_MESSAGE"], | |
) | |
' |