forked from rapidsai/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvercel.sh
More file actions
executable file
·49 lines (44 loc) · 801 Bytes
/
Copy pathvercel.sh
File metadata and controls
executable file
·49 lines (44 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -euo pipefail
USAGE="Usage:
build: vercel.sh
install deps: vercel.sh install
"
if [ $# -eq 0 ]; then
CMD="build"
elif [ $# -eq 1 ]; then
CMD="$1"
else
echo "${USAGE}"
exit 1
fi
INSTALL_PREFIX="/usr/local"
export PATH="${PATH}:${INSTALL_PREFIX}/go/bin"
install_dependencies() {
echo "installing dependencies..."
bundle install
npm install
}
build() {
echo "printing env..."
env | sort
echo "clean output directories..."
rm -rf ./.vercel/ ./_site
echo "building..."
jekyll build
mkdir -p .vercel/output/
node ci/vercel/config.mjs > .vercel/output/config.json
cp -r _site .vercel/output/static
}
case "${CMD}" in
"install")
install_dependencies
;;
"build")
build
;;
*)
echo "${USAGE}"
exit 1
;;
esac