# In case something goes horribly wrong, you can fall back to `image: ruby:latest` image: git-r3lab.uni.lu:4567/r3/docker/jekyll-lcsb:1.4 stages: - test - deploy - release # This will try to build the web site, and store the result in "build" directory test: stage: test variables: JEKYLL_ENV: production artifacts: expire_in: 3 days paths: - build before_script: - bundle install script: - 'echo "baseurl: /$CI_PROJECT_NAME" >> _config_ci.yml' - 'echo "url: https://$CI_PROJECT_NAMESPACE.$CI_PAGES_DOMAIN" >> _config_ci.yml' - bundle exec jekyll build -d build --config "_config.yml,_config_ci.yml" # This will actually deploy the web site when pushing to master pages: stage: deploy rules: # Run only on branch named "latest" - if: $CI_COMMIT_BRANCH == "latest" script: - mv build public - echo "Your website is available at $CI_PAGES_URL" artifacts: expire_in: 3 days paths: - public # This will push the gem to ruby-gems when tagged release: stage: release script: - mkdir -p ~/.gem && echo "$API_KEY_BASE64" | base64 --decode > ~/.gem/credentials && chmod 0600 ~/.gem/credentials - gem build jekyll-theme-lcsb-default.gemspec && gem push jekyll-theme-lcsb-default*.gem rules: # Run only on master... - if: $CI_COMMIT_TAG