File size: 437 Bytes
ae5e35f
 
 
 
 
 
 
 
b58143c
ae5e35f
4ccba0a
 
 
 
 
 
 
b58143c
4ccba0a
 
ae5e35f
 
165ae46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/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