igedi / .github /workflows /huggingface.yml
Andrea Maldonado
Updates huggingface CI for both
ddaf251
raw
history blame contribute delete
835 Bytes
name: Sync to Hugging Face hub
on:
push:
branches:
- main
- demo-icpm24
# to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
sync-to-hub:
runs-on: ubuntu-latest
steps:
- name: Check large files
uses: ActionsDesk/[email protected]
with:
filesizelimit: 10485760 # this is 10MB so we can sync to HF Spaces
- uses: actions/checkout@v3
with:
fetch-depth: 0
lfs: true
- name: Set current branch as a variable
id: set_branch
run: echo "CURRENT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: git push --force https://andreamalhera:[email protected]/spaces/${{ secrets.HF_SPACE }} $CURRENT_BRANCH:main