VERSION 0.6 docs-build: FROM ruby:latest WORKDIR /app RUN gem install coderay RUN gem install rouge RUN gem install asciidoctor # These dependencies are required for asciidoctor-mathematical RUN apt-get update RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install bison flex libffi-dev libxml2-dev libgdk-pixbuf2.0-dev libcairo2-dev libpango1.0-dev fonts-lyx cmake RUN gem install asciidoctor-mathematical COPY ./README.adoc docs/index.adoc COPY --dir ./docs . RUN asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg -a "!webfonts" -- ./docs/*.adoc RUN \ find docs -type f -not -iname '*.html' -not -iname '*.png' -not -iname '*.svg' -delete && \ : SAVE ARTIFACT ./docs docs: FROM golang:latest WORKDIR /app GIT CLONE https://github.com/tdewolff/minify/ minify/ RUN cd minify && go install ./cmd/minify COPY +docs-build/docs/ ./docs/ RUN minify --version RUN minify --sync --recursive --output output/ ./docs/ SAVE ARTIFACT output/* AS LOCAL build/docs/ all: BUILD +docs