Commit 0bb33839 by Marcus Andersson Committed by GitHub

Docs: updated cmd to build docs locally to generate docs prior to building site. (#28371)

* added instructions so we generate docs prior to building them.

* replaced ci script.

* improved according to feedback.
parent 2aafa398
......@@ -118,3 +118,6 @@ compilation-stats.json
# report dumping the whole system env
/report.*.json
# auto generated front end docs
/docs/sources/packages_api/*
\ No newline at end of file
.PHONY: docs docs-test
.PHONY: docs docs-test docs-no-pull docs-generate-frontend docs-no-generate-frontend
IMAGE = grafana/docs-base:latest
docs:
docker pull ${IMAGE}
docs-generate-frontend:
yarn install --pure-lockfile
yarn run packages:build
yarn run packages:docsExtract
yarn run packages:docsToMarkdown
yarn run packages:clean
docs-no-generate-frontend:
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server'
docs-no-pull:
docs: docs-generate-frontend
docker pull $(IMAGE)
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server'
docs-test:
docker pull ${IMAGE}
docs-no-pull: docs-generate-frontend docs-no-generate-frontend
docs-test: docs-generate-frontend
docker pull $(IMAGE)
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest --rm -it $(IMAGE) /bin/bash -c 'make prod'
......@@ -5,6 +5,7 @@ When you contribute to documentation, it is a good practice to build the docs on
## Requirements
Docker >= 2.1.0.3
Yarn >= 1.22.4
## Build the doc site
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment