diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index a35048d..19cf767 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -13,11 +13,14 @@ if [ $BRANCH -eq "preview" ]; then DRAFTS="--buildDrafts" fi +# Clone repo echo "- Cloning $REPO_URL (branch: $BRANCH)..." git clone --depth 1 --recurse-submodules --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR" +# Generate static files with hugo echo "- Building site with Hugo v$HUGO_VERSION in $HUGO_DEST..." hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --baseURL "$URL" $DRAFTS --logLevel info --cleanDestinationDir --gc --panicOnWarning --printI18nWarnings +# Start nginx echo "- Starting Nginx..." exec nginx -g 'daemon off;' \ No newline at end of file