Commit 0c564b55 authored by Michael Kohlhase's avatar Michael Kohlhase
parent 1bd729a5
Pipeline #490 failed with stage
in 17 seconds
# This file is a template, and might need editing before it works on your project.
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ce/pages/
image: ruby:2.3
variables:
JEKYLL_ENV: production
image: kwarc/jekyll-website-deployer
stages:
- deploy
before_script:
- bundle install
# setup locales
- echo "en_US UTF-8" > /etc/locale.gen
- which locale-gen || ( apt-get update -y && apt-get install locales )
- export LANG=en_US.UTF-8
- export LANGUAGE=en_US:en
- export LC_ALL=en_US.UTF-8
test:
stage: test
script:
- bundle exec jekyll build -d test
artifacts:
paths:
- test
except:
- master
# install ssh-agent, unless already there
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
# install rsync, unless already there
- 'which rsync || ( apt-get update -y && apt-get install rsync -y )'
# install bundler, unless already there
- 'which bundle || ( gem install bundler )'
pages:
# and install the bundle
- bundle install
# setup ssh agent with the private key
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
deploy_staging:
stage: deploy
script:
- bundle exec jekyll build -d public
artifacts:
paths:
- public
# build the website
- bundle exec jekyll build -d _site
# copy over all the files into the deployment folder
- cd _site && rsync -rv -e ssh --checksum ./ deploy@static.kwarc.info:/var/www/SIGMathLing.kwarc.info --delete
only:
- master
- master
Markdown is supported
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