diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7a9f76d..2483665 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,7 @@ pages: script: - wget https://github.com/getzola/zola/releases/download/v0.12.2/zola-v0.12.2-x86_64-unknown-linux-gnu.tar.gz -O zola.tgz - tar zxvf zola.tgz - - git clone https://github.com/getzola/book.git themes/book/ - - ./zola build + - ./build.sh artifacts: paths: - public diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..4e9b3b1 --- /dev/null +++ b/build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -euxo pipefail + +git clone https://github.com/getzola/book.git themes/book/ +rm -rf public/ +zola build + +# Make checkboxes editable, just in case the user wants to keep their own checklist. +find public/ -name "*.html" -type f -exec sed -i 's/input disabled=""/input/g' {} + diff --git a/netlify.toml b/netlify.toml index 1cc6b7a..9bd90bd 100644 --- a/netlify.toml +++ b/netlify.toml @@ -2,10 +2,7 @@ [build] publish = "public" -command = "git clone https://github.com/getzola/book.git themes/book/; zola build" +command = "./build.sh" [build.environment] ZOLA_VERSION = "0.12.2" - -[context.deploy-preview] -command = "zola build --base-url $DEPLOY_PRIME_URL"