~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion] andreijiroh.dev
zensical mkdocs-material website

ci: implement more compat work at Spindle CI workflow for builds

Also some fixes on the build script for fix some missing variables

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.dev>

andreijiroh.dev 295bcf7e 21fa52e9

verified
Changed files
+12 -4
.tangled
workflows
bin
+8 -3
.tangled/workflows/site-deploy.yml
···
- libjpeg
- zlib
- pngquant
+
# needed to generate LD_LIBRARY_PATH for cairo and friends
+
- findutils
environment:
CI: "true" # https://tangled.org/tangled.org/core/issues/310 (resolved via merging https://tangled.org/tangled.org/core/pulls/843)
# GitLab CI compatibility for some of our scripts that check these variables (for branch names
# and commit hashes, we simply use `git rev-parse` directly)
CI_PIPELINE_SOURCE: "push"
+
# technically we have --ingore-pipfile in the install command below, but just to be safe
+
PIPENV_IGNORE_PIPFILE: "true"
+
#
steps:
- name: Install deps
command: |
pipenv install --deploy --ignore-pipfile
npm ci
-
environment:
-
PIPENV_IGNORE_PIPFILE: "true"
# We configured our wrangler.toml to use our build script (at ../../bin/build.sh)
# for building the site and doing post-build prep (like copying well-known files
# and such). To minimize admin overhead on secrets management, we use `doppler run`
# to inject secrets from Doppler into the environment for the build and deploy steps.
- name: Deploy to Cloudflare Workers (as Static Site)
-
command: doppler run -- npm run deploy:cf
+
command: |
+
export LD_LIBRARY_PATH=$(find /nix/store -maxdepth 3 -type d -name lib | grep -E 'cairo|pango|gdk-pixbuf|librsvg|fontconfig|freetype|zlib' | tr '\n' ':')
+
doppler run -- npm run deploy:cf
+4 -1
bin/build.sh
···
#!/usr/bin/env bash
set -ex
-
TARGET_DIR="${PWD}/public"
+
GIT_ROOT=$(git rev-parse --show-toplevel)
+
SOURCE_DIR="${GIT_ROOT}/markdown"
+
TARGET_DIR="${GIT_ROOT}/public"
+
pipenv run build
cp "$TARGET_DIR/assets/images/favicon.png" "$TARGET_DIR/favicon.ico" -v
cp "$SOURCE_DIR/.well-known" "$TARGET_DIR/" -rv