Build first before serving

[ci skip]
This commit is contained in:
Luke Murphy 2020-04-23 13:48:24 +02:00
parent c7579b87b5
commit 68a8df1fb1
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 8 additions and 1 deletions

View File

@ -7,13 +7,20 @@ run_jekyll() {
set -eu
# shellcheck disable=SC2155
local args="--config $JEKYLL_CONFIG --host $JEKYLL_HOST --port $JEKYLL_PORT --trace --verbose"
local args="--config $JEKYLL_CONFIG --trace --verbose"
# shellcheck disable=SC2086
bundle exec jekyll build $args
# shellcheck disable=SC2155
local args="${args} --host $JEKYLL_HOST --port $JEKYLL_PORT"
if [[ $JEKYLL_ENV == "development" ]]; then
# shellcheck disable=SC2155
local args="${args} --incremental"
fi
# shellcheck disable=SC2086
bundle exec jekyll serve $args
}