Verified Commit 5c73e895 authored by Ingo Pfennigstorf's avatar Ingo Pfennigstorf 💅
Browse files

Add deployment as docker image

parent fb4cb2df
node_modules
image: ruby:2.3
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
JEKYLL_ENV: production
before_script:
- bundle install
test:
stage: test
script:
- bundle exec jekyll build -d test
artifacts:
paths:
- test
except:
- master
pages:
stage: deploy
script:
- bundle exec jekyll build -d public
artifacts:
paths:
- public
build_image:
stage: build
only:
- master
- de
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
services:
- docker:dind
FROM ruby:2.3 as build
ENV JEKYLL_ENV: production
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN bundle install && \
bundle exec jekyll build -d public
FROM nginx:1.13-alpine
COPY --from=build /usr/src/app/public/ /usr/share/nginx/html/
......@@ -5,7 +5,7 @@ paginate: 100 # it will paginate after this number
language: 'en-uk'
# edit baseurl to simply '/' if using as your personal page (instead of a project page)
baseurl: /lab.sub/
baseurl: /
# Website info
title: lab.sub
......@@ -14,8 +14,8 @@ cover: assets/images/blog-cover.jpg
logo: assets/images/sub-goettingen-white-small.svg
logo_dark: assets/images/favicon.png
favicon: assets/images/favicon.png
production_url: https://subugoe.pages.gwdg.de/lab.sub/
source_url: https://gitlab.gwdg.de/subugoe/lab.sub/
production_url: https://lab.sub.uni-goettingen.de/
source_url: https://lab.sub.uni-goettingen.de/
source_branch: master
# Social info
......
......@@ -35,7 +35,7 @@ into the {body} of the default.hbs template -->
{% endif %}
<div class="post-card {{ tag[0]}}">
{% if cover %}
<a class="post-card-image-link" href="{{ site.baseurl }}/tag/{{ tag[0] }}">
<a class="post-card-image-link" href="{{ site.baseurl }}tag/{{ tag[0] }}">
<div class="post-card-image" style="background-image: url({{ site.baseurl }}{{ cover }})"></div>
</a>
{% endif %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment