testxa / start.sh
Reaperxxxx's picture
Update start.sh
165ae46 verified
Raw
History Blame Contribute Delete
437 Bytes
#!/bin/bash
set -e
if [ -z "$GITHUB_TOKEN" ]; then
echo "Error: GITHUB_TOKEN is not set"
exit 1
fi
REPO_DIR="/app/chatlyst"
if [ -d "$REPO_DIR/.git" ]; then
echo "Repo exists, pulling latest changes..."
cd "$REPO_DIR"
git reset --hard
git pull
else
echo "Cloning private repo..."
git clone https://$GITHUB_TOKEN@github.com/reaperofssa/chatlyst.git "$REPO_DIR"
cd "$REPO_DIR"
fi
echo "Starting server..."
node app.js