Skip to content

Commit

Permalink
Merge pull request #315 from bcreane/bcreane-docs-staging
Browse files Browse the repository at this point in the history
Add make target to publish to docs-staging project
  • Loading branch information
bcreane committed Mar 22, 2018
2 parents e830095 + 4ebbcf9 commit 25a1174
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,34 @@ endif

.PHONY: publish-cnx-docs.yaml
publish-cnx-docs.yaml: build website/generate_site.sh
cp website/robots.txt _site/ # robots.txt is not generated by jekyll, copy manually
cp website/robots.txt _site/ # robots.txt is not generated by jekyll, copy manually
website/generate_site.sh > publish-cnx-docs.yaml

.PHONY: publish-cnx-docs
publish-cnx-docs: publish-cnx-docs.yaml
@echo "In order to publish the site to docs.tigera.io,"
@echo "run the following command:"
@echo "In order to publish the site, run the following command:"
@echo " gcloud app deploy --project=tigera-docs publish-cnx-docs.yaml"
@echo
@echo "Then visit: https://docs.tigera.io."
@echo
@echo "If you're on the gcloud console and wish to test the site"
@echo "on the staging server, run the following command:"
@echo " dev_appserver.py publish-cnx-docs.yaml"
@echo
@echo "Then click on the \"Preview on port 8080\" icon."

# publish-cnx-docs-staging is a developer make target which lets you preview
# the CNX docs in a location that is not visibile to customers.
# Note that you'll need appropriate permissions in the tigera-docs-staging GCP
# project.
#
.PHONY: publish-cnx-docs-staging
publish-cnx-docs-staging: publish-cnx-docs.yaml
gcloud app deploy --project=tigera-docs-staging publish-cnx-docs.yaml
@echo "Visit https://tigera-docs-staging.appspot.com"
@echo
@echo "Note you'll need to authenticate with your tigera.io google account."

update_canonical_urls:
# You must pass two version numbers into this command, e.g., make update_canonical_urls OLD=v3.0 NEW=v3.1
# Looks through all directories and replaces previous latest release version numbers in canonical URLs with new
Expand Down
2 changes: 1 addition & 1 deletion website/generate_site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ handlers:
#
- url: /(.*\.(yaml|yml))$
static_files: _site/\1
mime_type: text/yaml
mime_type: text/x-yaml
upload: _site/(.*\.(yaml|yml))$
# Specify mime-type for sh files since GAE doesn't handle this correctly.
Expand Down

0 comments on commit 25a1174

Please sign in to comment.