Merge pull request #22995 from inductor/feature/improve_build

Improve front build
This commit is contained in:
Kubernetes Prow Robot
2020-11-03 04:18:16 -08:00
committed by GitHub
3 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ RUN apk add --no-cache \
build-base \
libc6-compat \
npm && \
npm install -G autoprefixer postcss-cli
npm install -D autoprefixer postcss-cli
ARG HUGO_VERSION
+1 -1
View File
@@ -65,7 +65,7 @@ container-image:
--build-arg HUGO_VERSION=$(HUGO_VERSION)
container-build: module-check
$(CONTAINER_RUN) --read-only $(CONTAINER_IMAGE) hugo --minify
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 $(CONTAINER_IMAGE) sh -c "npm ci && hugo --minify"
container-serve: module-check
$(CONTAINER_RUN) --read-only --mount type=tmpfs,destination=/tmp,tmpfs-mode=01777 -p 1313:1313 $(CONTAINER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 --destination /tmp/hugo --cleanDestinationDir
+2 -4
View File
@@ -12,7 +12,6 @@ You can run the website locally using Hugo (Extended version), or you can run it
To use this repository, you need the following installed locally:
- [yarn](https://yarnpkg.com/)
- [npm](https://www.npmjs.com/)
- [Go](https://golang.org/)
- [Hugo (Extended version)](https://gohugo.io/)
@@ -28,9 +27,6 @@ cd website
The Kubernetes website uses the [Docsy Hugo theme](https://github.com/google/docsy#readme). Even if you plan to run the website in a container, we strongly recommend pulling in the submodule and other development dependencies by running the following:
```
# install dependencies
yarn
# pull in the Docsy submodule
git submodule update --init --recursive --depth 1
```
@@ -53,6 +49,8 @@ Make sure to install the Hugo extended version specified by the `HUGO_VERSION` e
To build and test the site locally, run:
```bash
# install dependencies
npm ci
make serve
```