Skip to content

Commit

Permalink
Set up netlify deploys
Browse files Browse the repository at this point in the history
add makefile to use in Netlify
  • Loading branch information
jputrino committed May 11, 2020
1 parent 636904a commit 36073b1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,8 @@ default.pem

# Platform specific CRD schema generation scripts
hack/controller-gen-*

# Ignore local docs dependencies
docs-web/.netlify/state.json
site/
venv/
21 changes: 21 additions & 0 deletions docs-web/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
NETLIFY_ROOT = /opt/build/repo
SITE_ROOT = ${NETLIFY_ROOT}/site
BUILDDIR = ${NETLIFY_ROOT}/docs-web/build
THEME_REPO = ${THEME_REPO_URL}

.PHONY: all build clean setup

all: clean setup build

clean:
rm -rf ${SITE_ROOT}

setup:
mkdir ${SITE_ROOT}
@git clone -q --single-branch --branch master https://$(GITHUB_PAT)@${THEME_REPO} ${SITE_ROOT}/docs-nginx-com
pip install -r ${SITE_ROOT}/docs-nginx-com/requirements.txt
rsync -avOz ${NETLIFY_ROOT}/docs-web/ ${SITE_ROOT}/docs-nginx-com/source/nginx-ingress-controller/ --exclude ${NETLIFY_ROOT}/docs-web/Makefile

build:
sphinx-build -b dirhtml -d ${BUILDDIR}/doctrees ${SITE_ROOT}/docs-nginx-com/source ${BUILDDIR}/dirhtml
@echo "Build finished. The HTML pages are in ${BUILDDIR}/dirhtml."

0 comments on commit 36073b1

Please sign in to comment.