summaryrefslogtreecommitdiffhomepage
path: root/website/Makefile
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-11-18 13:40:27 -0800
committerAdin Scannell <ascannell@google.com>2020-04-21 12:00:59 -0700
commit957e26a6f30d40e2bff042d76a327d0a2cfbabae (patch)
tree3e95d46355585ae4661de5cef30cdca72a7c94bb /website/Makefile
parentdc2f198866c5fd8162a79978eb3633975d3ba11f (diff)
Move website to a simpler jekyll-based template
This will allow us to merge the site into the main repository. This merge allows the documentation to be kept up-to-date and synchronized with the main project. Builds will be triggered on any update, removing the need for the cron-based reploy.
Diffstat (limited to 'website/Makefile')
-rw-r--r--website/Makefile42
1 files changed, 42 insertions, 0 deletions
diff --git a/website/Makefile b/website/Makefile
new file mode 100644
index 000000000..12c9fd26b
--- /dev/null
+++ b/website/Makefile
@@ -0,0 +1,42 @@
+# Copyright 2019 Google LLC
+#
+# 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
+#
+# https://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.
+
+build:
+ @bazel run //runsc -- help syscalls -format json -filename $(PWD)/syscalls.json
+ @docker build -t gvisor-website .
+ @docker run -v $$PWD:/work -w /work gcr.io/cloud-builders/npm ci
+ @$(MAKE) update
+.PHONY: build
+
+lint:
+ @docker run -v $$PWD:/work -w /work gcr.io/cloud-builders/npm run lint-md
+.PHONY: lint
+
+update: lint
+ @mkdir -p _site && sudo chmod a+rw _site
+ @docker run -v $$PWD:/site -w /site gvisor-website || ($(MAKE) clean && exit 1)
+ @sudo chown -R $$(id -u):$$(id -g) _site
+.PHONY: build
+
+clean:
+ @sudo rm -rf _site node_modules syscalls.json
+.PHONY: clean
+
+server:
+ @go run gvisor.dev/website/cmd/gvisor-website
+.PHONY: server
+
+deploy: update
+ @docker run --entrypoint=gcloud gvisor-website app deploy app.yaml
+.PHONY: deploy