adjust to new workflow
This commit is contained in:
@@ -3,25 +3,58 @@ stages:
|
|||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
DOCKER_TLS_CERTDIR: "/certs"
|
DOCKER_TLS_CERTDIR: "/certs"
|
||||||
|
|
||||||
build:
|
.build_template: &build_template
|
||||||
image: docker:24.0.5
|
image: docker:24.0.5
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
|
||||||
- main
|
|
||||||
services:
|
services:
|
||||||
- docker:24.0.5-dind
|
- docker:24.0.5-dind
|
||||||
script:
|
script:
|
||||||
- echo "$CI_REGISTRY_PASSWORD" | docker login registry.remo-liebmann.de -u reguser --password-stdin
|
- echo "$CI_REGISTRY_PASSWORD" | docker login registry.remo-liebmann.de -u reguser --password-stdin
|
||||||
- docker build -t registry.remo-liebmann.de/hallofbrawl-homepage:latest .
|
- docker build --build-arg HUGO_ENV=$HUGO_ENV -t registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG .
|
||||||
- docker push registry.remo-liebmann.de/hallofbrawl-homepage:latest
|
- docker push registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG
|
||||||
|
|
||||||
deploy:
|
.deploy_template: &deploy_template
|
||||||
image: alpine/curl
|
image: alpine/curl
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- curl --insecure -X POST $PORTAINER_WEBHOOK
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# PRODUCTION (main)
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
build_prod:
|
||||||
|
<<: *build_template
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
script:
|
variables:
|
||||||
- curl --insecure -I -X POST https://192.168.12.21:9443/api/webhooks/ee5dbc0d-18e8-45d7-bcfd-b24d1f2c0ee6
|
IMAGE_TAG: prod
|
||||||
|
HUGO_ENV: production
|
||||||
|
|
||||||
|
deploy_prod:
|
||||||
|
<<: *deploy_template
|
||||||
|
only:
|
||||||
|
- main
|
||||||
|
variables:
|
||||||
|
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/ee5dbc0d-18e8-45d7-bcfd-b24d1f2c0ee6"
|
||||||
|
|
||||||
|
# -------------------------
|
||||||
|
# DEVELOPMENT (development)
|
||||||
|
# -------------------------
|
||||||
|
|
||||||
|
build_dev:
|
||||||
|
<<: *build_template
|
||||||
|
only:
|
||||||
|
- development
|
||||||
|
variables:
|
||||||
|
IMAGE_TAG: dev
|
||||||
|
HUGO_ENV: development
|
||||||
|
|
||||||
|
deploy_dev:
|
||||||
|
<<: *deploy_template
|
||||||
|
only:
|
||||||
|
- development
|
||||||
|
variables:
|
||||||
|
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/DEV-WEBHOOK-ID"
|
||||||
@@ -2,7 +2,9 @@ FROM docker.io/hugomods/hugo:latest AS build
|
|||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN git submodule update --init --recursive --progress
|
RUN git submodule update --init --recursive --progress
|
||||||
RUN hugo
|
ARG HUGO_ENV=production
|
||||||
|
ENV HUGO_ENV=${HUGO_ENV}
|
||||||
|
RUN hugo --environment $HUGO_ENV --minify
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=build /src/public /usr/share/nginx/html
|
COPY --from=build /src/public /usr/share/nginx/html
|
||||||
34
config/development/hugo.toml
Normal file
34
config/development/hugo.toml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
theme = "blowfish"
|
||||||
|
defaultContentLanguage = "de"
|
||||||
|
enableRobotsTXT = true
|
||||||
|
summaryLength = 50
|
||||||
|
buildDrafts = false
|
||||||
|
buildFuture = true
|
||||||
|
enableEmoji = true
|
||||||
|
baseURL = "https://dev.hallofbrawl.de"
|
||||||
|
googleAnalytics = ""
|
||||||
|
|
||||||
|
[pagination]
|
||||||
|
pagerSize = 100
|
||||||
|
|
||||||
|
[imaging]
|
||||||
|
anchor = "Center"
|
||||||
|
|
||||||
|
[taxonomies]
|
||||||
|
tag = "tags"
|
||||||
|
category = "categories"
|
||||||
|
author = "authors"
|
||||||
|
series = "series"
|
||||||
|
|
||||||
|
[sitemap]
|
||||||
|
changefreq = "daily"
|
||||||
|
filename = "sitemap.xml"
|
||||||
|
priority = 0.5
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
home = [ "HTML", "RSS", "JSON" ]
|
||||||
|
|
||||||
|
[related]
|
||||||
|
threshold = 0
|
||||||
|
toLower = false
|
||||||
|
indices = [ { name = "tags", weight = 100 }, { name = "categories", weight = 100 }, { name = "series", weight = 50 }, { name = "authors", weight = 20 }, { name = "date", weight = 10 }, { applyFilter = false, name = "fragmentrefs", type = "fragments", weight = 10 } ]
|
||||||
@@ -3,7 +3,7 @@ defaultContentLanguage = "de"
|
|||||||
enableRobotsTXT = true
|
enableRobotsTXT = true
|
||||||
summaryLength = 50
|
summaryLength = 50
|
||||||
buildDrafts = false
|
buildDrafts = false
|
||||||
buildFuture = false
|
buildFuture = true
|
||||||
enableEmoji = true
|
enableEmoji = true
|
||||||
baseURL = "https://www.hallofbrawl.de"
|
baseURL = "https://www.hallofbrawl.de"
|
||||||
googleAnalytics = ""
|
googleAnalytics = ""
|
||||||
Reference in New Issue
Block a user