From 83a4ee08c6af6c8211d8d5fd59c2ab5e14fe0d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20Kadir=20Ak=C4=B1n?= Date: Sat, 13 Dec 2025 21:17:11 +0300 Subject: [PATCH] ci(workflows): Add workflow step to sync prompts.csv to Hugging Face --- .github/workflows/update-contributors.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/update-contributors.yml b/.github/workflows/update-contributors.yml index f20730bb..64072958 100644 --- a/.github/workflows/update-contributors.yml +++ b/.github/workflows/update-contributors.yml @@ -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