forked from d2iq-archive/dcos-docs-site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (63 loc) · 1.59 KB
/
Makefile
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#
# Util
#
clean: ## Remove all build folders
./scripts/clean.sh
reduce-pages:
./scripts/reduce-pages.sh
#
# Migration
#
migration:
./scripts/migration.sh
#
# Redirects
#
build-redirects:
npm run crawler
#
# Build
#
build-development: build-api
npm run dev
#
# Build PDF
#
build-pdf-production:
./scripts/pdf.sh ./build ./build-pdf
build-pdf-concat-production:
./scripts/pdf-concat.sh ./pages ./build-pdf
build-pdf-development: build-api docker-development-up-pdf
npm run build-pdf
./scripts/pdf.sh ./build/1.10 ./build-pdf http://0.0.0.0:8002/
build-pdf-concat-development:
./scripts/pdf-concat.sh ./pages ./build-pdf
#
# Build API
#
build-api: build-swagger build-ngindox
build-swagger:
./scripts/swagger.sh ./pages ./build-swagger
build-ngindox:
./scripts/ngindox.sh ./pages ./build-ngindox
#
# Docker
#
docker-site-build: ## Build site docker image. Required env vars: ALGOLIA_PROJECT_ID, ALGOLIA_PUBLIC_KEY, ALGOLIA_PRIVATE_KEY, ALGOLIA_INDEX
./scripts/build-site.sh
docker-pdf-build: ## Build pdf docker image.
./scripts/build-pdf.sh
docker-site-run: ## Run site container.
docker-compose -f ./docker/docker-compose.production.yml up -d docs
docker-pdf-run: ## Run pdf container.
docker-compose -f ./docker/docker-compose.production.yml up -d pdf
docker-site-check-links: ## Run link checker test
docker-compose -f ./docker/docker-compose.production.yml up test
docker-purge:
./scripts/docker-purge.sh
#
# Help
#
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help