name: Deploy to Hugging Face Spaces | |
on: | |
push: | |
branches: [main] | |
# to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
deploy-to-hub: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- name: Set up Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Action" | |
- name: Update README | |
run: | | |
python scripts/update_readme.py | |
git add README.md | |
git commit -m "README metadata" | |
- name: Push to hub | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
run: git push -f https://ericbotti:[email protected]/spaces/ericbotti/chameleon main |