cotech-website/.gitlab-ci.yml

40 lines
843 B
YAML
Raw Normal View History

image: ruby:2.5.3
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
before_script:
2018-11-18 16:05:08 +00:00
- 'which rsync || ( apt-get update -qq && apt-get install rsync -yqq )'
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- 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
2018-11-18 16:05:08 +00:00
- rsync -aqz public/ cotech@webarch2.co.uk:sites/default/
2018-11-29 14:47:18 +00:00
- cd public ; git checkout dev ; cd -
- bundle exec jekyll build -d public
2018-11-29 12:49:27 +00:00
- rsync -aqz public/ cotech@webarch2.co.uk:sites/dev/
artifacts:
paths:
- public
only:
- master