site/build.sh

23 lines
477 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2020-08-11 16:14:38 +02:00
set -e
declare -a zola_options
SCHABERNACK_ENV=${SCHABERNACK_ENV:-production}
if [ "${SCHABERNACK_ENV}" = "staging" ]; then
echo "Building staging version" >&2
zola_options+=(-u https://staging.schulischer-schabernack.de)
fi
2020-08-11 16:14:38 +02:00
./metadata.py
zola build ${zola_options[@]}
2020-08-11 16:14:38 +02:00
echo "Encoding…"
2020-08-24 23:02:08 +02:00
./encode.py
2020-08-11 16:14:38 +02:00
./metadata.py
zola build ${zola_options[@]}
if [ "${SCHABERNACK_ENV}" = "staging" ]; then
cp static/robots.txt.staging public/robots.txt
fi