From 4c4421ea973ec9d3ccda9e3dacd587c726c00803 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Tue, 6 Oct 2020 14:30:50 -0400 Subject: [PATCH 1/2] Clayton is not an approver here --- OWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/OWNERS b/OWNERS index 26c94616..3ef31e95 100644 --- a/OWNERS +++ b/OWNERS @@ -1,6 +1,5 @@ approvers: - stevekuznetsov -- smarterclayton - bbguimaraes - droslean - hongkailiu From 89c6f584dc7d75c9c356023c6bc8f3f5663499c8 Mon Sep 17 00:00:00 2001 From: Alvaro Aleman Date: Tue, 6 Oct 2020 14:29:22 -0400 Subject: [PATCH 2/2] Add Dockerfile --- Dockerfile | 9 +++++++++ Makefile | 2 ++ netlify.toml | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 Dockerfile create mode 100644 Makefile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..247e93a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM klakegg/hugo:0.75.1-ext-ubuntu as builder + +COPY ./ /src/ + +RUN set -x && ln -s /bin/bash /usr/bin/bash && make generate + +FROM nginxinc/nginx-unprivileged:1.18-alpine + +COPY --from=builder /src/public/ /usr/share/nginx/html/ diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..89602a84 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +generate: + npm install -D --save postcss postcss-cli autoprefixer && cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify diff --git a/netlify.toml b/netlify.toml index 5a8b8e54..c63788cb 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,6 +1,6 @@ [build] publish = "public" -command = "npm install -D --save postcss postcss-cli autoprefixer && cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify" +command = "make generate" [context.production.environment] HUGO_VERSION = "0.75.1" @@ -8,14 +8,14 @@ HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" [context.split1] -command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify --enableGitInfo" +command = "make generate" [context.split1.environment] HUGO_VERSION = "0.75.1" HUGO_ENV = "production" [context.deploy-preview] -command = "cd themes/docsy && git submodule update -f --init && cd ../.. && hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" +command = "make generate" [context.deploy-preview.environment] HUGO_VERSION = "0.75.1"