travis for docker build and hugo site

This commit is contained in:
Mahmoud Zalt committed 2017-04-14 14:52:54 -04:00
commit 57ee5d96a4
2 files changed
+39 -12

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
if [ -n "${PHP_VERSION}" ]; then
cp env-example .env
docker-compose build
docker images
fi
if [ -n "${HUGO_VERSION}" ]; then
HUGO_PACKAGE=hugo_${HUGO_VERSION}_Linux-64bit
HUGO_BIN=hugo_${HUGO_VERSION}_linux_amd64
# Download hugo binary
curl -L https://github.com/spf13/hugo/releases/download/v$HUGO_VERSION/$HUGO_PACKAGE.tar.gz | tar xz
mkdir $HOME/bin
mv ./${HUGO_BIN}/${HUGO_BIN} $HOME/bin/hugo
# Remove existing docs
rm -r ./docs
# Build docs
cd DOCUMENTATION
hugo
fi