Skip to content

Commit

Permalink
Using docker run to build PDF docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Dec 7, 2022
1 parent 6ea50de commit a60d06c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ci/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
set -e
TAG=$1
WD=$(pwd)
SOURCE_DIR=${WD}/docs
OUTPUT_DIR=${WD}/dist/docs

echo "Removing existing files"
mkdir -p ${OUTPUT_DIR}
rm -Rf ${OUTPUT_DIR}/*.pdf

echo "Generating docs"
cd ${WD}/docs && ls *.adoc | xargs -I{} asciidoctor-pdf -a revnumber=${TAG} -D ${OUTPUT_DIR} {}
set -x
cd "$SOURCE_DIR" && ls *.adoc | while read file; do
docker run --rm --pull always -v "$OUTPUT_DIR:/output" -v "$SOURCE_DIR:/source" asciidoctor/docker-asciidoctor:1 asciidoctor-pdf -a "revnumber=$TAG" -D /output "/source/$file"
done

0 comments on commit a60d06c

Please sign in to comment.