Skip to content
Snippets Groups Projects
Commit 0c564b55 authored by Michael Kohlhase's avatar Michael Kohlhase
Browse files
parent 1bd729a5
Branches
No related tags found
No related merge requests found
Pipeline #
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment