Michael
Update sync.yml
448df38 unverified
Raw History Blame Contribute Delete
1.2 kB
name: Sync with Original HF Space
on:
schedule:
- cron: '0 0 * * *' # Runs once a day at midnight UTC. Change to '*/15 * * * *' for every 15 minutes.
workflow_dispatch: # Allows you to trigger the sync manually.
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch and Push Changes
run: |
# Configure Git credentials
git config --global user.name "Hugging Face Sync Bot"
git config --global user.email "bot@huggingface.co"
# Add the original HF space as a remote source
git remote add original https://huggingface.co/spaces/michael2222222/Interacting-With-LLMs
# Add your duplicate HF space as the destination destination
git remote add duplicate https://USER:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/Anonymized1/Interacting-With-LLMs
# Fetch the latest code from the original space
git fetch original main
# Push the updates to your duplicate space
git push duplicate original/main:main --force