mirror of
https://github.com/kairos-io/kairos.git
synced 2025-02-09 05:18:51 +00:00

* 📖 Add SENA whitepaper announcement Update also README Signed-off-by: mudler <mudler@c3os.io> * 🤖 docs: build also future blog posts Signed-off-by: mudler <mudler@c3os.io> * 📖 Update README Signed-off-by: mudler <mudler@c3os.io> * 📖 Minor fixups Signed-off-by: mudler <mudler@c3os.io> --------- Signed-off-by: mudler <mudler@c3os.io>
27 lines
774 B
Bash
Executable File
27 lines
774 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
BASE_URL="${BASE_URL:-https://kairos.io}"
|
|
|
|
binpath="${ROOT_DIR}/bin"
|
|
publicpath="${ROOT_DIR}/public"
|
|
export PATH=$PATH:$binpath
|
|
|
|
if [ -z "$(type -P hugo)" ];
|
|
then
|
|
[[ ! -d "${binpath}" ]] && mkdir -p "${binpath}"
|
|
wget https://github.com/gohugoio/hugo/releases/download/v"${HUGO_VERSION}"/hugo_extended_"${HUGO_VERSION}"_"${HUGO_PLATFORM}".tar.gz -O "$binpath"/hugo.tar.gz
|
|
tar -xvf "$binpath"/hugo.tar.gz -C "${binpath}"
|
|
rm -rf "$binpath"/hugo.tar.gz
|
|
chmod +x "$binpath"/hugo
|
|
fi
|
|
|
|
rm -rf "${publicpath}" || true
|
|
[[ ! -d "${publicpath}" ]] && mkdir -p "${publicpath}"
|
|
|
|
npm install --save-dev autoprefixer postcss-cli postcss
|
|
|
|
HUGO_ENV="production" hugo --buildFuture --gc -b "${BASE_URL}" -d "${publicpath}"
|
|
|
|
cp -rf CNAME "${publicpath}"
|