ci(workflows): Add workflow step to sync prompts.csv to Hugging Face

This commit is contained in:
Fatih Kadir Akın
2025-12-13 21:17:11 +03:00
parent 09cca370e8
commit 83a4ee08c6

View File

@@ -37,3 +37,23 @@ jobs:
- name: Push changes
run: |
git push origin main --force-with-lease
- name: Sync to Hugging Face
env:
HF_API_TOKEN: ${{ secrets.HF_API_TOKEN }}
run: |
pip install huggingface_hub
python3 << 'EOF'
import os
from huggingface_hub import HfApi
api = HfApi(token=os.environ["HF_API_TOKEN"])
api.upload_file(
path_or_fileobj="prompts.csv",
path_in_repo="prompts.csv",
repo_id="fka/awesome-chatgpt-prompts",
repo_type="dataset",
commit_message="Update prompts.csv"
)
print("Successfully synced prompts.csv to Hugging Face")
EOF