Add build script and make checkboxes enabled

This commit is contained in:
Stavros Korokithakis 2021-01-07 19:31:46 +02:00
parent febce549dc
commit fc17f838e7
No known key found for this signature in database
GPG Key ID: 26EA345ECD4C2A63
3 changed files with 12 additions and 6 deletions

View File

@ -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

10
build.sh Executable file
View File

@ -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' {} +

View File

@ -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"