Skip to content
Snippets Groups Projects
Commit 0c564b55 authored by Michael Kohlhase's avatar Michael Kohlhase
Browse files
parent 1bd729a5
No related branches found
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. image: kwarc/jekyll-website-deployer
# Template project: https://gitlab.com/pages/jekyll stages:
# Docs: https://docs.gitlab.com/ce/pages/ - deploy
image: ruby:2.3
variables:
JEKYLL_ENV: production
before_script: 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: # install ssh-agent, unless already there
stage: test - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
script:
- bundle exec jekyll build -d test # install rsync, unless already there
artifacts: - 'which rsync || ( apt-get update -y && apt-get install rsync -y )'
paths:
- test # install bundler, unless already there
except: - 'which bundle || ( gem install bundler )'
- master
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 stage: deploy
script: script:
- bundle exec jekyll build -d public # build the website
artifacts: - bundle exec jekyll build -d _site
paths: # copy over all the files into the deployment folder
- public - cd _site && rsync -rv -e ssh --checksum ./ deploy@static.kwarc.info:/var/www/SIGMathLing.kwarc.info --delete
only: only:
- master - master
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment