From 9b36a9aecbd2896da5fcd75f8f6e39b16827d0ec Mon Sep 17 00:00:00 2001 From: Gerard Bosch Date: Sat, 14 Sep 2024 23:31:58 +0200 Subject: [PATCH] Add a build.sh script --- build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cf154e6 --- /dev/null +++ b/build.sh @@ -0,0 +1,23 @@ + +#!/bin/bash +# +# This build script is intended for Netlify to publish the us-resume branch - GitHub does not +# support multiple branch deployments :'( +# + +# Exit immediately if a command exits with a non-zero status +set -e + +# Extract Docker image from the GitHub workflow to avoid inconsistencies +DOCKER_IMAGE=$(grep -oP "docker_image:\s*'\K[^']+" '.github/workflows/compile.yml') + +mkdir -p build + +# Compile the LaTeX document +docker run --rm -v "$(pwd)":/workspace -w /workspace "$DOCKER_IMAGE" latexmk + +# Log built files +echo 'Files in the build dir:' +echo '=======================' +ls -la build +