Skip to content

Commit 1f2fc34

Browse files
committed
add support for deploying stage
1 parent 3764e1a commit 1f2fc34

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bin/prod/deploy

+6-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ if [ -z $mode ]; then
88
elif [ $mode = "main" ]; then
99
REMOTE="clyde"
1010
REMOTE_DIR="/home/lichess"
11+
elif [ $mode = "stage" ]; then
12+
REMOTE="khiaw"
13+
REMOTE_DIR="/home/lichess-stage"
1114
elif [ $mode = "salim2" ]; then
1215
REMOTE="salim2"
1316
REMOTE_DIR="/home/lila"
@@ -45,7 +48,7 @@ fi
4548

4649
lilalog "Deploy to $mode server $REMOTE:$REMOTE_DIR"
4750

48-
if [ $mode == "main" ]; then
51+
if [ $mode == "main" ] || [ $mode == "stage" ]; then
4952
bin/prod/compile-client
5053
fi
5154

@@ -75,7 +78,7 @@ RSYNC_OPTIONS=" \
7578
--exclude '.git/' \
7679
--exclude bin/.translate_version"
7780

78-
if [ $mode != "main" ]; then
81+
if [ $mode == "main" ] && [ $mode != "stage" ]; then
7982
RSYNC_OPTIONS="$RSYNC_OPTIONS \
8083
--exclude public";
8184
fi
@@ -95,7 +98,7 @@ if [ $mode == "main" ]; then
9598
bin/cli-prod deploy post
9699
fi
97100

98-
if [ $mode == "main" ]; then
101+
if [ $mode == "main" ] || [ $mode == "stage" ]; then
99102
lilalog "Restart lichess"
100103
ssh $REMOTE "chown -R lichess:lichess $REMOTE_DIR && service lichess restart"
101104
fi

0 commit comments

Comments
 (0)