Add build.earth for docs
This commit is contained in:
parent
cc09f72584
commit
33dc2965cc
52
build.earth
Normal file
52
build.earth
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
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 ./design-workflow .
|
||||||
|
|
||||||
|
RUN asciidoctor -r asciidoctor-mathematical -a mathematical-format=sv -a "!webfonts" -- ./design-workflow/*.adoc
|
||||||
|
RUN \
|
||||||
|
cd ./design-workflow/ && \
|
||||||
|
rm -rf \
|
||||||
|
*.adoc \
|
||||||
|
*.ods \
|
||||||
|
*.csv \
|
||||||
|
*.txt.gz \
|
||||||
|
*.ipynb \
|
||||||
|
.ipynb_checkpoints \
|
||||||
|
:
|
||||||
|
|
||||||
|
SAVE ARTIFACT ./design-workflow
|
||||||
|
|
||||||
|
docs:
|
||||||
|
FROM golang:latest
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
GIT CLONE https://github.com/tdewolff/minify/ minify/
|
||||||
|
|
||||||
|
RUN cd minify && go install ./cmd/minify
|
||||||
|
|
||||||
|
COPY +docs-build/./design-workflow/ ./design-workflow/
|
||||||
|
RUN minify --version
|
||||||
|
RUN minify --sync --recursive --output output/ ./design-workflow/
|
||||||
|
|
||||||
|
# RUN mv output/static/* output/
|
||||||
|
# RUN rmdir output/static
|
||||||
|
|
||||||
|
SAVE ARTIFACT output/* AS LOCAL build/docs/
|
||||||
|
|
||||||
|
all:
|
||||||
|
BUILD +docs-build
|
||||||
|
BUILD +docs
|
Loading…
Reference in New Issue
Block a user