this_algorithm/build.earth

43 lines
1.0 KiB
Plaintext
Raw Normal View History

2023-02-09 00:31:38 -05:00
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
2023-02-28 09:36:36 -05:00
COPY ./README.adoc docs/index.adoc
2023-02-19 02:30:27 -05:00
COPY --dir ./docs .
2023-02-09 00:31:38 -05:00
2023-02-19 02:30:27 -05:00
RUN asciidoctor -r asciidoctor-mathematical -a mathematical-format=svg -a "!webfonts" -- ./docs/*.adoc
2023-02-09 00:31:38 -05:00
RUN \
2023-02-19 02:30:27 -05:00
find docs -type f -not -iname '*.html' -not -iname '*.png' -not -iname '*.svg' -delete && \
2023-02-09 00:31:38 -05:00
:
2023-02-19 02:30:27 -05:00
SAVE ARTIFACT ./docs
2023-02-09 00:31:38 -05:00
docs:
FROM golang:latest
WORKDIR /app
GIT CLONE https://github.com/tdewolff/minify/ minify/
RUN cd minify && go install ./cmd/minify
2023-02-19 02:30:27 -05:00
COPY +docs-build/docs/ ./docs/
2023-02-09 00:31:38 -05:00
RUN minify --version
2023-02-19 02:30:27 -05:00
RUN minify --sync --recursive --output output/ ./docs/
2023-02-09 00:31:38 -05:00
SAVE ARTIFACT output/* AS LOCAL build/docs/
all:
BUILD +docs