Files
cotech-website/.gitlab-ci.yml
Chris Lowis 18851086d9 Upgrade ruby and gems
Ruby 2.6.6 has reached the end-of-life and I had some trouble
installing the dependencies locally as a result. I've updated to the
latest version of ruby and regenerated the Gemfile.lock with the
latest versions of the two gems we depend on, and their dependencies.

Everything looks to still be working in terms of site generation.
2025-06-20 10:57:07 +01:00

71 lines
1.3 KiB
YAML

---
image: ruby:3.4.4
stages:
- test
- staging
- production
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
cache:
key: gems
paths:
- vendor
before_script:
- '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
- ssh-keyscan web.cotech.uk > ~/.ssh/known_hosts
- ssh-keyscan 81.95.52.59 >> ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
- bundle install --path vendor
test:
stage: test
script:
- bundle exec jekyll build -d test
artifacts:
paths:
- test
except:
- master
deploy:dev:
stage: staging
script:
- bundle exec jekyll build -d public
- rsync -aqz --delete-after public/ cotech@web.cotech.uk:sites/dev/
artifacts:
paths:
- public
environment:
name: dev
url: https://dev.coops.tech
only:
- master
deploy:production:
stage: production
script:
- bundle exec jekyll build -d public
- rsync -aqz --delete-after public/ cotech@web.cotech.uk:sites/default/
artifacts:
paths:
- public
environment:
name: production
url: https://www.coops.tech
only:
- master
when: manual
after_script:
- rm -rf /root/.ssh/
...