From a75b15ef5be23ada6644e2c5765b429631ac86e1 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Sat, 5 Aug 2017 21:11:12 -0700 Subject: [PATCH] Create "make stage" for staging container Signed-off-by: Ahmet Alp Balkan --- Makefile | 3 +++ .../contribute/stage-documentation-changes.md | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3657cb577a..ff308061a4 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,6 @@ build-preview: ## Build site with drafts and future posts enabled. serve: ## Boot the development server. jekyll serve + +stage: ## Run the Jekyll staging container. + docker run -ti --rm -v "$PWD":/k8sdocs -p 4000:4000 gcr.io/google-samples/k8sdocs:1.1 diff --git a/docs/home/contribute/stage-documentation-changes.md b/docs/home/contribute/stage-documentation-changes.md index 8fdfc43887..c81ea176ed 100644 --- a/docs/home/contribute/stage-documentation-changes.md +++ b/docs/home/contribute/stage-documentation-changes.md @@ -43,10 +43,13 @@ for this image. 1. In the root of your cloned repository, enter this command to start a local web server: - docker run -ti --rm -v "$PWD":/k8sdocs -p 4000:4000 gcr.io/google-samples/k8sdocs:1.1 + make stage -1. View your staged content at -http://localhost:4000. + This will run the following command: + + docker run -ti --rm -v "$PWD":/k8sdocs -p 4000:4000 gcr.io/google-samples/k8sdocs:1.1 + +1. View your staged content at `http://localhost:4000`. ## Staging locally without Docker @@ -56,21 +59,20 @@ http://localhost:4000. 1. Verify that Ruby and RubyGems are installed: - gem --version + gem --version 1. Install the GitHub Pages package, which includes Jekyll: - gem install github-pages + gem install github-pages 1. Clone your fork to your local development machine. 1. In the root of your cloned repository, enter this command to start a local web server: - jekyll serve + jekyll serve -1. View your staged content at -http://localhost:4000. +1. View your staged content at `http://localhost:4000`. NOTE: If you do not want Jekyll to interfere with your other globally installed gems, you can use `bundler`: