Add basic scripts
This commit is contained in:
commit
d6ce22b765
|
@ -0,0 +1,13 @@
|
|||
#!/usr/local/bin/bash
|
||||
# $1 = source
|
||||
# $2 = destination
|
||||
# $3 = temp dir
|
||||
|
||||
rm -rf "$3"
|
||||
mkdir -p "$2" "$3"
|
||||
|
||||
git clone "$1" "$3"
|
||||
jekyll build --source "$3" --destination "$2"
|
||||
chmod -R g+w "$2"
|
||||
|
||||
rm -rf "$3"
|
|
@ -0,0 +1,25 @@
|
|||
#!/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"
|
Loading…
Reference in New Issue