testchat / .github /workflows /sync-to-hub.yml
aakashbansal's picture
Update sync-to-hub.yml
58c8539 unverified
raw
history blame contribute delete
815 Bytes
name: Sync to Hugging Face Hub
on:
# This action runs every time you push code to the 'main' branch
push:
branches:
- master
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from your GitHub repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Step 2: Push the code to your Hugging Face Space repository
- name: Push to Hugging Face Hub
env:
# This uses the HF_TOKEN we created in the previous step
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
# Push the 'master' branch from GitHub to the 'main' branch on Hugging Face
git push https://aakashbansal:${HF_TOKEN}@huggingface.co/spaces/aakashbansal/testchat master:main -f