Skip to content

Commit

Permalink
Add a build.sh script
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardbosch committed Sep 14, 2024
1 parent 2fab2ae commit 9b36a9a
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9b36a9a

Please sign in to comment.