diff --git a/netlify.toml b/netlify.toml index 12a2ed1198..67e28ca58e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,8 +1,8 @@ [build] base = "site/" - command = "hugo" + command = "git submodule update --init --recursive --depth 1 && hugo" publish = "publishedSite/" - ignore = "git diff $COMMIT_REF master -- site/" # only build if changes to the site + ignore = "exit 1" [build.environment] HUGO_VERSION = "0.92.2" @@ -10,7 +10,7 @@ NETLIFY_BUILD_DEBUG = "true" [context.deploy-preview] - command = "hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL" + command = "git submodule update --init --recursive --depth 1 hugo --enableGitInfo --buildFuture -b $DEPLOY_PRIME_URL" [context.branch-deploy] ignore = "exit 0" # build PRs (deploy preview env) only, not all branches