px / start.sh
txtorg's picture
Create start.sh
1715579 verified
Raw
History Blame Contribute Delete
436 Bytes
#!/bin/bash
set -e
TMP_DIR="/tmp/repo"
rm -rf $TMP_DIR
mkdir -p $TMP_DIR
if [ -z "$GITHUB_PAT" ]; then
echo "❌ ERROR: GITHUB_PAT environment variable is not set"
exit 1
fi
git clone https://$GITHUB_PAT@github.com/reaperofssa/sigh.git $TMP_DIR
cp -r $TMP_DIR/* /app/
cp -r $TMP_DIR/.[!.]* /app/ 2>/dev/null || true # copy hidden files like .env, .gitignore
# Remove temp folder
rm -rf $TMP_DIR
cd /app
exec node app.js