forked from boozallen/mkdocs-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Justfile
52 lines (39 loc) · 1.33 KB
/
Justfile
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
# the output directory for the documentation
docsDir := "site"
# describes available recipes
help:
just --list --unsorted
# wipe local caches
clean:
rm -rf {{docsDir}}
############################
# Documentation Recipes
############################
# builds the jte docs builder image
docsImage := "jte-docs-builder"
buildDocsImage:
docker build docs -t {{docsImage}}
# Build the jte documentation
docs: buildDocsImage
docker run --rm -v $(pwd):/docs {{docsImage}} build
# serve the docs locally for development
serve: buildDocsImage
docker run --rm -p 8000:8000 -v $(pwd):/docs {{docsImage}} serve -a 0.0.0.0:8000
lint-docs: lint-prose lint-markdown
# use Vale to lint the prose of the documentation
lint-prose:
docker run -v $(pwd):/app -w /app jdkato/vale docs
# use markdownlit to lint the docs
lint-markdown:
docker run -v $(pwd):/app -w /app davidanson/markdownlint-cli2:0.3.1 "docs/**/*.md"
# update current docs
update-docs: buildDocsImage
#!/usr/bin/env bash
version=$(./gradlew -q printJTEVersion)
docker run --rm -v ~/.git-credentials:/root/.git-credentials -v $(pwd):/app -w /app --entrypoint=mike jte-docs-builder deploy -f --push $version
echo "INFO - Published version '$version' to GitHub Pages"
###################
# Aggregate Tasks
###################
# Lint code and docs
lint: lint-docs