File size: 851 Bytes
bbea1cc
 
 
 
 
edf454b
bbea1cc
edf454b
 
 
bbea1cc
 
 
 
 
 
edf454b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
HF_REPO=/tmp/hf-croissant
echo "Deleting $HF_REPO..."
rm -rf ${HF_REPO}
git clone [email protected]:spaces/marcenacp/croissant-editor ${HF_REPO}
echo "Copying files from $PWD to $HF_REPO..."
rsync -aP --exclude="README.md" --exclude="*node_modules*" --exclude="cypress/*" --exclude="*__pycache__*" . ${HF_REPO}
cd ${HF_REPO}
git add .
git commit -m "Deploy (see actual commits on https://github.com/mlcommons/croissant)."
echo "Now push with: 'cd $HF_REPO && git push'."
echo "Warning: if it fails, you may need to follow https://huggingface.co/docs/hub/security-git-ssh#generating-a-new-ssh-keypair"
echo "On Hugging Face Spaces, you might have to set the following environment variables:"
echo "- REDIRECT_URI"
echo "- OAUTH_STATE"
echo "- OAUTH_CLIENT_ID"
echo "- OAUTH_CLIENT_SECRET"
echo "Visit: https://huggingface.co/spaces/marcenacp/croissant-editor"