Newer
Older

Laurent Heirendt
committed
image:
name: alpine/git:latest
entrypoint: [""]
- git clone https://$CI_DEPLOY_TOKEN:$CI_DEPLOY_PASSWORD@git-r3lab.uni.lu/R3/school/courses.lcsb.uni.lu.git
artifacts:
expire_in: 1 day
paths:
- courses.lcsb.uni.lu
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
script:
- python .ci/generateIndex.py
artifacts:
expire_in: 1 day
paths:
- courses.lcsb.uni.lu
image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
- cd courses.lcsb.uni.lu
- gem install bundler -v2.0.2
- bundle install && bundle update jekyll-theme-lcsb-default && bundle update jekyll-theme-lcsb-frozen-components
- bundle exec jekyll build -d site --config "_config.yml"
- mv site ../.
- cd ..
artifacts:
expire_in: 1 day
paths:
- site
variables:
JEKYLL_ENV: production
image: git-r3lab.uni.lu:4567/r3/docker/nodejs-yarn-grunt
stage: build
rules:
- if: $CI_COMMIT_BRANCH == "develop"
artifacts:
expire_in: 1 day
paths:
- public
before_script:
- 'which ssh-agent || ( apk add --update openssh )'
- eval $(ssh-agent -s)
- echo "$B64SSHPRIVKEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- 'echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
- chmod 644 ~/.ssh/known_hosts
rules:
- if: $CI_COMMIT_BRANCH == "develop"
- if: $CI_COMMIT_BRANCH == "master"
- scp -P $SSHPORT -r site/* $SSHCONNECT:~/web/latest