name: Sync to Hugging Face Hub on: push: branches: [ main ] # to run this workflow manually from the Actions tab workflow_dispatch: jobs: sync-to-hub: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 lfs: true - name: Push to hub env: HF_TOKEN: ${{ secrets.HF_TOKEN }} run: | echo "---" > README.tmp.md cat metadata.yml >> README.tmp.md echo "---" >> README.tmp.md echo "" >> README.tmp.md cat README.md >> README.tmp.md mv README.tmp.md README.md git config --global user.email "action@github.com" git config --global user.name "GitHub Action" git commit -am "Prepend metadata for Hugging Face" git push -f https://Redlion007:$HF_TOKEN@huggingface.co/spaces/Redlion007/LLM-and-RAG-Application-GenAI main