1
0
mirror of https://github.com/rancher/os.git synced 2025-09-12 13:17:17 +00:00

update master to generate docs like rancher.github.io does

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit
2017-08-17 06:01:19 +10:00
parent cb36d1c400
commit 7a0ebc409b
81 changed files with 538 additions and 174 deletions

27
docs/Makefile Normal file
View File

@@ -0,0 +1,27 @@
.PHONY: default build build-nginx run live
default: build build-nginx run
# this target sets up Jekyll, and uses it to build html
build:
docker build -t rancher/rancher.github.io:build -f Dockerfile.build .
# this target uses the Jekyll html image in a multistage Dockerfile to build a small nginx image
build-nginx:
docker build -t rancher/rancher.github.io .
run: build-nginx
docker run --rm -p 80:80 rancher/rancher.github.io
# this target will use the jekyll image and bind mount your local repo, when you modify a file, the html will be automatically rebuilt. (the redirects from latest won't work)
# You can also examine the output html in the _sites dir.
live:
docker run --rm -it -p 80:4000 \
-v $(PWD)/os:/build/os/v1.0/en \
-v $(PWD)/_site:/build/_site \
rancher/rancher.github.io:build jekyll serve -w -P 4000 --incremental
clean:
rm -rf _sites
docker rmi rancher/rancher.github.io
docker rmi rancher/rancher.github.io:build