diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 366ed2320f52e20efbb3b9f52a50933b6994c3ae..a36699a53cf24bc38fc044484d285a9e8377570b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,14 @@ build: entrypoint: [""] script: - echo "{\"auths\":{\"harbor.c3sl.ufpr.br\":{\"username\":\"$HARBOR_USER\",\"password\":\"$HARBOR_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --single-snapshot --context . --destination harbor.c3sl.ufpr.br/root/docs --cache=false --compressed-caching=false --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + - /kaniko/executor \ + --single-snapshot \ + --context . \ + --snapshot-mode=redo \ + --use-new-run \ + --destination harbor.c3sl.ufpr.br/root/docs \ + --cache=true --compressed-caching=false \ + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" deploy: stage: deploy diff --git a/Dockerfile b/Dockerfile index f35580174101c0492fa60719f02d0e96a16c2715..d3e8e32cf5a2e49041d046a82a9010de1cbbf354 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,11 +4,11 @@ WORKDIR /app COPY . . -RUN apt-get update -y && apt-get install -y golang -RUN npm install postcss postcss-cli autoprefixer -RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.deb -o hugo.deb -RUN dpkg -i hugo.deb -RUN hugo +RUN apt-get update -y && apt-get install -y golang && \ + npm install postcss postcss-cli autoprefixer && \ + curl -L https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.deb -o hugo.deb && \ + dpkg -i hugo.deb && \ + hugo FROM nginx:alpine