Skip to content

trying on other branch again #3

trying on other branch again

trying on other branch again #3

Workflow file for this run

name: Deploy to Hugging Face Space
on:
push:
branches:
- main
- update-hf-deploy
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
lfs: false
- name: Prepare clean HF deploy branch without assets
run: |
git config user.email "ci@github.actions"
git config user.name "github-actions[bot]"
mv README.md README.project.md
cat << 'EOF' > README.md
---
title: AI Agent
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: docker
app_port: 7860
pinned: false
---
EOF
cat README.project.md >> README.md
rm -rf assets
git checkout --orphan hf-deploy
git reset
git add -A
git commit -m "Deploy to Hugging Face Space"
- name: Push to HF Space from branch
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
git push --force \
https://SDSC:${HF_TOKEN}@huggingface.co/spaces/SDSC/ai-agent \
hf-deploy:main