26 lines
303 B
Bash
Executable File
26 lines
303 B
Bash
Executable File
#!/usr/local/bin/bash
|
|
# $1 = source
|
|
# $2 = destination
|
|
# $3 = temp dir
|
|
|
|
|
|
# While another process is deploying
|
|
while [ -e "$3" ]
|
|
do
|
|
sleep 3
|
|
done
|
|
|
|
|
|
mkdir -p "$2" "$3"
|
|
|
|
git --work-tree="$3" --git-dir="$1" checkout -f
|
|
|
|
cd "$3"
|
|
npm install
|
|
npm run deploy
|
|
cp -r dist/ "$2"
|
|
|
|
chmod -R g+w "$2"
|
|
|
|
rm -rf "$3"
|