-
Notifications
You must be signed in to change notification settings - Fork 0
/
Earthfile
59 lines (50 loc) · 1.16 KB
/
Earthfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
VERSION 0.6
IMPORT ./scripts/build/ox-hugo AS ox-hugo
markdown:
FROM ox-hugo+export
COPY --dir org .
RUN mkdir static
RUN --entrypoint
SAVE ARTIFACT ./content content
SAVE ARTIFACT ./static static
markdown-watch:
FROM ox-hugo+export
ENV EARTHLY true
ENTRYPOINT ["emacs", "-Q", "--batch", "--load", "$HOME/.emacs.d/watch.el"]
locally-markdown:
LOCALLY
COPY +markdown/content ./
COPY +markdown/static ./
hugo:
FROM klakegg/hugo:debian
WORKDIR /app
COPY . .
build:
FROM +hugo
COPY --dir \
./static \
./themes \
./archetypes \
.
COPY --dir \
+markdown/content \
+markdown/static \
.
RUN hugo build --minify --destination /www
SAVE ARTIFACT /www www
docs:
LOCALLY
COPY +build/www ./docs
server:
LOCALLY
WITH DOCKER \
--pull klakegg/hugo:latest \
--load blog.dkendal.com/emacs:latest=+markdown-watch \
--compose docker-compose.yml
RUN docker-compose up --remove-orphans --abort-on-container-exit; docker-compose down -v
END
repl:
FROM +emacs
WORKDIR /app
COPY . /app
RUN --interactive emacs --batch --eval "(while t (condition-case err (print (eval (read))) (error (print err))))"