2021-06-08 09:40:42 +02:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
echo -e '\e[1m\e[36m========== Installing gulp & dependencies ==========\e[0m'
|
|
|
|
yarn install
|
|
|
|
# Install dependencies one-by-one to avoid race-conditions
|
2023-02-04 00:04:15 +01:00
|
|
|
yarn --cwd ./scripts/shared-hugo-scripts/
|
2021-06-08 09:40:42 +02:00
|
|
|
yarn hugo version
|
|
|
|
echo -e '\e[1m\e[36m========== Starting gulp deploy task ===============\e[0m'
|
2021-06-11 23:04:27 +02:00
|
|
|
if [[ -n "${EPHEMERAL_BASE_URL}" ]]; then
|
|
|
|
echo -e "\e[1m\e[36m========== Ephemeral Mode URL: ${EPHEMERAL_BASE_URL} ===============\e[0m"
|
|
|
|
yarn run gulp all --ephemeral "${EPHEMERAL_BASE_URL}"
|
|
|
|
else
|
|
|
|
yarn run build
|
|
|
|
fi
|
2021-06-08 09:40:42 +02:00
|
|
|
|
|
|
|
echo -e '\e[1m\e[32m Success! Site deployed to `build` folder.\e[0m'
|