Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 15d7df9

Browse files
authoredMay 25, 2022
Slightly refactors preview script (redis-stack#52)
1 parent da306d5 commit 15d7df9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed
 

‎netlify.bash

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
#!/bin/bash
2-
rm -rf redis-stack-website
2+
# Prepares the Netlify preview
3+
: ${REDIS_STACK_REPOSITORY:="github.com/redis-stack/redis-stack-website"}
4+
if [[ -n $PRIVATE_ACCESS_TOKEN ]]; then
5+
REDIS_STACK_REPOSITORY="$PRIVATE_ACCESS_TOKEN@$REDIS_STACK_REPOSITORY"
6+
fi
37
repo_dir=$(pwd)
4-
git clone --recurse-submodules https://$PRIVATE_ACCESS_TOKEN@github.com/redis-stack/redis-stack-website
5-
cd redis-stack-website
6-
pip3 install -r requirements.txt
7-
npm install autoprefixer
8-
REPO_DIR=$repo_dir REPOSITORY_URL=$REPOSITORY_URL PREVIEW_MODE=1 make netlify
8+
9+
rm -rf website
10+
git clone --recurse-submodules https://$REDIS_STACK_REPOSITORY website
11+
cd website
12+
REPO_DIR=$repo_dir REPOSITORY_URL=$REPOSITORY_URL PREVIEW_MODE=1 make deps netlify

0 commit comments

Comments
 (0)
Please sign in to comment.