agency / .github /workflows /hugging-face.yaml
Zai
starting the class
eba1125
raw
history blame contribute delete
No virus
1.4 kB
name: Uploading on Huggingface
on:
push:
branches: [main]
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set Git identity
run: |
git config --global user.email "github-actions-bot@github.com"
git config --global user.name "GitHub Actions"
- name: Update README.md
run: |
tmp_file=$(mktemp)
echo "---" >> $tmp_file
echo "title: Agency" >> $tmp_file
echo "emoji: 🤝" >> $tmp_file
echo "colorFrom: yellow" >> $tmp_file
echo "colorTo: gray" >> $tmp_file
echo "sdk: streamlit" >> $tmp_file
echo "sdk_version: 1.29.0" >> $tmp_file
echo "app_file: app.py" >> $tmp_file
echo "pinned: false" >> $tmp_file
echo "license: openrail" >> $tmp_file
echo "---" >> $tmp_file
echo "" >> $tmp_file
cat README.md >> $tmp_file
mv $tmp_file README.md
git add README.md
git commit -m "Updated README.md"
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: zaibutcooler
SPACE_NAME: yume
run: git push --force https://zaibutcooler:$HF_TOKEN@huggingface.co/spaces/zaibutcooler/agency main