-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Add scripts and tasks to publish docs to github pages #2430
Changes from all 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 |
---|---|---|
|
@@ -35,4 +35,7 @@ coverage.txt | |
test/e2e/e2e\.test | ||
|
||
# mkdocs | ||
/site | ||
site | ||
|
||
# temporal github pages | ||
gh-pages |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2018 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
if ! [ -z $DEBUG ]; then | ||
set -x | ||
fi | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
if [ "$COMPONENT" != "docs" ]; then | ||
echo "This task runs only to publish docs" | ||
exit 0 | ||
fi | ||
|
||
make -C ${DIR}/.. build-docs | ||
|
||
git config --global user.email "[email protected]" | ||
git config --global user.name "Travis Bot" | ||
|
||
git clone --branch=gh-pages --depth=1 https://${GH_REF} ${DIR}/gh-pages | ||
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. I'm curious to know why 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. I can change that but I found so many different ways that I choose this one. I can change this 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. No need to, I haven't looked into the tool myself. |
||
cd ${DIR}/gh-pages | ||
|
||
git rm -r . | ||
|
||
cp -r ${DIR}/../site/* . | ||
|
||
git add . | ||
git commit -m "Deploy GitHub Pages" | ||
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" gh-pages > /dev/null 2>&1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,3 +213,11 @@ dep-ensure: | |
.PHONY: dev-env | ||
dev-env: | ||
@./hack/build-dev-env.sh | ||
|
||
.PHONY: live-docs | ||
live-docs: | ||
@docker run --rm -it -p 3000:3000 -v ${PWD}:/docs aledbf/mkdocs:0.1 | ||
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.
What is this? Something custom? 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. 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. I will create a repo for this image (I don't want to install mkdocs in my machine to test the docs or run a local copy) 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. @ElvinEfendi repository of the mkdocs image https://github.com/aledbf/mkdocs |
||
|
||
.PHONY: build-docs | ||
build-docs: | ||
@docker run --rm -it -v ${PWD}:/docs aledbf/mkdocs:0.1 build |
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.
Who do we not need
TRAVIS_TIMEOUT
anymore?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.
This was required only for the s390x and ppc64le nginx images. Right now I am building that with an AWS VM