added git--lfs and .gitattributes #22
This file contains hidden or 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 Agent Tide Demo to Hugging Face Space | |
| on: | |
| push: | |
| branches: [main] | |
| tags: [ "*" ] | |
| release: | |
| types: [published, created, edited] | |
| workflow_dispatch: | |
| jobs: | |
| sync-to-hub: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Deploy examples/hf_demo_space to HF Space | |
| env: | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
| run: | | |
| rsync -av codetide/agents/tide/ui/.chainlit/ examples/hf_demo_space/.chainlit/ | |
| rsync -av codetide/agents/tide/ui/public/ examples/hf_demo_space/public/ | |
| cp codetide/agents/tide/ui/chainlit.md examples/hf_demo_space/ | |
| cp codetide/agents/tide/ui/chainlit.md examples/hf_demo_space/ | |
| cp .gitattributes examples/hf_demo_space | |
| cd examples/hf_demo_space | |
| git lfs install | |
| git init --initial-branch=main | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git remote add origin https://McLoviniTtt:$HF_TOKEN@huggingface.co/spaces/McLoviniTtt/AgentTideDemo | |
| git add . | |
| git commit -m "Deploy Agent Tide Demo to HF Space"y | |
| git push --force --all |