From 05c8a5e9d3f7fd93ccf7d25c885996ce6f2e2a45 Mon Sep 17 00:00:00 2001 From: Ihor Aleksandrychiev Date: Wed, 8 Apr 2026 14:24:20 +0300 Subject: [PATCH] Added CI Docker build with sample content Ticket: ENT-13823 Signed-off-by: Ihor Aleksandrychiev --- .github/workflows/docker-image.yml | 7 +++++-- .gitignore | 5 +++++ Containerfile | 4 ++-- samples/content/_index.md | 5 +++++ samples/content/getting-started/_index.md | 6 ++++++ samples/content/getting-started/introduction.md | 6 ++++++ samples/layouts/partials/.gitignore | 2 ++ 7 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 samples/content/_index.md create mode 100644 samples/content/getting-started/_index.md create mode 100644 samples/content/getting-started/introduction.md create mode 100644 samples/layouts/partials/.gitignore diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9607908..d49dd0a 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -14,6 +14,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Copy sample content + run: | + cp config.toml.example config.toml + cp -r samples/* ./ - name: Build the Docker image - # run: docker build . --file Dockerfile --tag my-image-name:$(date +%s) - run: echo TODO ENT-13823 # docker build --tag nt-docs -f Containerfile . + run: docker build --tag nt-docs -f Containerfile . diff --git a/.gitignore b/.gitignore index 8368fdb..2c83c33 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,7 @@ /node_modules /public +/content +/layouts +/scripts/search/server/node_modules/ +config.toml +.hugo_build.lock diff --git a/Containerfile b/Containerfile index 591b5fa..90cdda3 100644 --- a/Containerfile +++ b/Containerfile @@ -3,11 +3,11 @@ ARG TARGETPLATFORM WORKDIR /docs ADD https://github.com/gohugoio/hugo/releases/download/v0.160.0/hugo_0.160.0_Linux-64bit.tar.gz hugo.tar.gz RUN echo "2c49f8f153b159ac81ee76ddeb126e913fadf8d5376a9ddc479e8772766dbde3 hugo.tar.gz" | sha256sum -c -RUN tar -zxvf hugo.tar.gz +RUN tar -zxvf hugo.tar.gz && mv hugo /usr/local/bin/hugo COPY ./ /docs RUN npm ci RUN npm run build:all -RUN ./hugo --logLevel info +RUN hugo --logLevel info RUN find public -type f -regex '^.*\.\(svg\|css\|html\|xml\|gif\)$' -size +1k -exec gzip -k '{}' \; FROM nginx:stable-alpine diff --git a/samples/content/_index.md b/samples/content/_index.md new file mode 100644 index 0000000..a3e4d15 --- /dev/null +++ b/samples/content/_index.md @@ -0,0 +1,5 @@ +--- +title: "Documentation" +--- + +Welcome to the documentation. diff --git a/samples/content/getting-started/_index.md b/samples/content/getting-started/_index.md new file mode 100644 index 0000000..e0ff01e --- /dev/null +++ b/samples/content/getting-started/_index.md @@ -0,0 +1,6 @@ +--- +title: "Getting Started" +sorting: 1 +--- + +Getting started with the product. diff --git a/samples/content/getting-started/introduction.md b/samples/content/getting-started/introduction.md new file mode 100644 index 0000000..7ca0ebd --- /dev/null +++ b/samples/content/getting-started/introduction.md @@ -0,0 +1,6 @@ +--- +title: "Introduction" +sorting: 1 +--- + +This is a sample introduction page. diff --git a/samples/layouts/partials/.gitignore b/samples/layouts/partials/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/samples/layouts/partials/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore