Skip to content

Bump typescript from 5.6.2 to 5.6.3 in the node-requirements group (#… #195

Bump typescript from 5.6.2 to 5.6.3 in the node-requirements group (#…

Bump typescript from 5.6.2 to 5.6.3 in the node-requirements group (#… #195

Workflow file for this run

---
name: Sync Space
permissions: read-all
on:
push:
branches:
- main
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Login with Huggingface CLI
run: |
pip install -U huggingface_hub[cli] hf-transfer
git config --global credential.helper store
huggingface-cli login --token ${{ secrets.HF_TOKEN }}
- name: Upload Files
env:
HF_HUB_ENABLE_HF_TRANSFER: 1
run: |
files=$(git diff --name-only HEAD HEAD~1)
deleted_files=$(git diff --name-only --diff-filter=A HEAD HEAD~1)
upload_files() {
local file=$1
if [ "$file" != "README.md" ] && [ "$file" != ".gitignore" ] && [ "$file" != ".chainlit/config.toml" ] && [ "$file" != "Modelfile" ]; then
huggingface-cli upload --repo-type space TotalSundae/dungeons-and-dragons $file $file
fi
}
for file in $files; do
if [[ ! "${deleted_files[@]}" =~ "${file}" ]]; then
upload_files $file
else
echo "File $file needs to be deleted"
fi
done