-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add publish script #104
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
VENV := build/venv | ||
DOCS_OUTPUT_DIR ?= generated/docs | ||
DOCS_PUBLISH_DIR ?= ../envoy-docs | ||
|
||
.PHONY: docs | ||
docs: | ||
rm -fr generated/docs | ||
mkdir -p generated/docs | ||
docs/build.sh $(DOCS_OUTPUT_DIR) | ||
|
||
.PHONY: publish_docs | ||
publish_docs: docs | ||
docs/publish.sh $(DOCS_OUTPUT_DIR) $(DOCS_PUBLISH_DIR) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
How to publish new docs: | ||
|
||
* The docs are contained in the gh-pages branch in the repo. | ||
* Clone a fresh copy of the repo into a parallel envoy-docs directory. | ||
* Run: `make publish_docs` | ||
* Run: `cd ../envoy-docs` | ||
* Verify the latest commit looks OK | ||
* Run: `git push origin gh-pages:gh-pages` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
DOCS_DIR=$1 | ||
PUBLISH_DIR=$2 | ||
BUILD_SHA=`git rev-parse HEAD` | ||
|
||
if [[ ! -d $PUBLISH_DIR ]]; then | ||
echo "$PUBLISH_DIR does not exist. Clone a fresh envoy repo." | ||
fi | ||
|
||
git -C $PUBLISH_DIR fetch | ||
git -C $PUBLISH_DIR checkout -B gh-pages origin/gh-pages | ||
rm -fr $PUBLISH_DIR/* | ||
cp -r $DOCS_DIR/* $PUBLISH_DIR | ||
git -C $PUBLISH_DIR add . | ||
git -C $PUBLISH_DIR commit -m "docs @$BUILD_SHA" | ||
|
||
echo | ||
echo "*** YOU MUST MANUALLY PUSH the gh-pages branch after verifying the commit ***" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do i need to do anything else after push to origin? can you put in some docs that, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added README, let me know if that looks OK |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
sphinx==1.4.5 | ||
sphinx_rtd_theme==0.1.9 | ||
sphinxcontrib-httpdomain==1.5.0 | ||
GitPython==2.0.8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not much care about these, curious about the reason of making version as 0-sha and release as 0sha
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo fixing