this_algorithm/build.earth
2023-02-19 02:30:27 -05:00

46 lines
1.0 KiB
Plaintext

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 --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/
# RUN mv output/static/* output/
# RUN rmdir output/static
SAVE ARTIFACT output/* AS LOCAL build/docs/
all:
BUILD +docs-build
BUILD +docs