Skip to content

Commit

Permalink
fix build-hf-space.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Sep 25, 2024
1 parent 21840dc commit b80dfdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-hf-space.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
if [ -z "$HF_TOKEN" ]; then
echo "HF_TOKEN is not set, skipping..."
else
git config --global user.email "[email protected]"
git config --global user.name "Xuan Son NGUYEN"
cd scripts && ./build_hf_space.sh
fi
env:
Expand Down
10 changes: 6 additions & 4 deletions scripts/build_hf_space.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@

set -e

# clone
echo ">>> clone"
rm -rf _tmp_hf_space
git clone https://ngxson:${HF_TOKEN}@huggingface.co/spaces/ngxson/wllama --depth 1 _tmp_hf_space

# build
echo ">>> build"
cd _tmp_hf_space
./build.sh

# push
echo ">>> push"
git add -A
git commit -m "update"
git push

# clean up
echo ">>> clean up"
cd ..
rm -rf _tmp_hf_space

echo ">>> done"

0 comments on commit b80dfdd

Please sign in to comment.