-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·27 lines (26 loc) · 862 Bytes
/
deploy.sh
File metadata and controls
executable file
·27 lines (26 loc) · 862 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
#!/bin/bash
git config --global user.email "kevin@vandelayeducation.com"
git config --global user.name "Kevin Colten"
if [ "${CIRCLE_BRANCH}" == "preview" ]; then export JEKYLL_ENV='preview.'; fi
if [ "${CIRCLE_BRANCH}" == "preview" ] || [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn images
yarn configs
yarn jekyll-build-amp
yarn optimize
yarn css
ITER=0
for file in ./_configs/*; do
if [[ -f $file ]] && [[ $(($ITER % $CIRCLE_NODE_TOTAL)) == $CIRCLE_NODE_INDEX ]]; then
export KEY=$(echo $file | sed "s/^.\/_configs\/\(.*\).yml$/\1/")
yarn jekyll-build
yarn favicon
if [ "${CIRCLE_BRANCH}" == "master" ]; then yarn sitemap; fi
yarn jekyll-build
yarn jekyll-build-amp
yarn optimize
if [ "${CIRCLE_BRANCH}" == "preview" ]; then yarn encrypt; fi
yarn deploy
fi
((ITER++))
done
fi