diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..7d6a52f --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +for i in .jekyll-cache vendor vendor/bundle _site ; do + podman unshare mkdir -p "$(pwd)/${i}" + podman unshare chown -R $(id -u):$(id -u) "$(pwd)/${i}" +done + +podman unshare chown -R $(id -u):$(id -u) "$(pwd)/Gemfile.lock" + +podman images | grep -q jekyll || \ + podman run \ + --volume="$(pwd):/srv/jekyll:z" \ + --volume="$(pwd)/vendor/bundle:/usr/local/bundle:z" \ + --rm -it jekyll/jekyll bundle update + +podman run \ + --volume="$(pwd):/srv/jekyll:z" \ + --volume="$(pwd)/vendor/bundle:/usr/local/bundle:z" \ + -p 4000:4000/tcp \ + --rm -it jekyll/jekyll jekyll serve +