diff --git a/.drone.yml b/.drone.yml index e62f5a0..0863c0c 100644 --- a/.drone.yml +++ b/.drone.yml @@ -60,6 +60,14 @@ steps: if grep -qx 'all' changed-bases.txt || grep -qx 'do-blog' changed-bases.txt; then echo "Building do-blog" clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:blog:shadow-cljs-run release blog + # The release build writes documents/org-meta-index.edn; the static + # generator then renders index.html, archive/, posts/ etc. (these are + # gitignored, so without this step the server keeps stale pages that + # still load the old /js/main.js). + echo "Generating do-blog static pages" + clj -Sdeps '{:mvn/local-repo "/drone/cache/.m2/repository" :gitlibs-dir "/drone/cache/.gitlibs"}' -M:blog -m com.oly.static-sites.do-blog.ssr + test -f bases/do-blog/resources/public/index.html + test -f bases/do-blog/resources/public/archive/index.html echo "Deploying do-blog" command -v scp >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y -qq openssh-client >/dev/null; } mkdir -p ~/.ssh && printf '%s\n' "$SSH_KEY" > ~/.ssh/id_rsa && chmod 600 ~/.ssh/id_rsa