From acd828d02c3a6665c0882c71026a6af55ca4c68b Mon Sep 17 00:00:00 2001 From: Tom Wiesing <tkw01536@gmail.com> Date: Thu, 5 Oct 2017 15:21:44 +0200 Subject: [PATCH] Migrate to GitLab CI --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ CNAME | 1 - _config.yml | 3 ++- 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 .gitlab-ci.yml delete mode 100644 CNAME diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b05e9a2 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +image: ruby:2.3 +stages: + - deploy + +before_script: + # 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 + + # 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 )' + + # 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: + # build the website + - bundle exec jekyll build -d _site + # copy over all the files into the deployment folder + - cd _site && rsync -rv -e ssh ./ deploy@magma.informatik.uni-erlangen.de:/var/www/kwarc.info --delete + only: + - master \ No newline at end of file diff --git a/CNAME b/CNAME deleted file mode 100644 index 6a9b605..0000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -new.kwarc.info diff --git a/_config.yml b/_config.yml index 2ff21a0..17b92ab 100644 --- a/_config.yml +++ b/_config.yml @@ -10,7 +10,8 @@ paginate: 10 paginate_path: "/news/page:num/" blog_path: "/news/" future: True -gems: +encoding: utf-8 +plugins: - jekyll-paginate - jekyll-github-metadata - jekyll-redirect-from -- GitLab