Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix showcase deployment script #875

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions showcase/deploy_to_hf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,19 @@ fi

# Get the path of this script which is the demo dir.
DEMO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cp -R "$DEMO_DIR/" "$DEST_PATH"
echo "Demo files have been copied to $DEST_PATH"

cd "$DEST_PATH"
echo "Changed directory to $DEST_PATH"

git init

git branch -m main
git config user.name github-actions[bot]
git config user.email github-actions[bot]@users.noreply.github.com
echo "Configured git user"
git add .

git commit -m "Commit"

# The hf remote may already exist if the script has been run
# on this dest directory before.
git remote add hf https://huggingface.co/spaces/wwwillchen/mesop-showcase || true

git push hf --force
git remote add hf https://wwwillchen:[email protected]/spaces/wwwillchen/mesop-showcase || true
git push --force --set-upstream hf main

echo "Pushed to: https://huggingface.co/spaces/wwwillchen/mesop-showcase. Check the logs to see that it's deployed correctly."
Loading