Sync to Hugging Face Space #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync to Hugging Face Space | |
on: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
jobs: | |
sync-space: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure git | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
- run: git clone https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/mozilla-ai/document-to-podcast hf-space | |
- run: | | |
cp demo/app.py hf-space/app.py | |
cp demo/requirements.txt hf-space/requirements.txt | |
- run: | | |
cd hf-space | |
git add . | |
git commit -m "Sync with https://github.com/mozilla-ai/document-to-podcast" | |
- name: Push to Hugging Face | |
run: | | |
cd hf-space | |
git push https://${{ secrets.HF_USERNAME }}:${{ secrets.HF_TOKEN }}@huggingface.co/spaces/mozilla-ai/document-to-podcast main |