Newer
Older
# 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
Jacek Lebioda
committed
stages:
- test
- deploy
- release
# This will try to build the web site, and store the result in "build" directory
variables:
JEKYLL_ENV: production
- 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
rules:
# Run only on branch named "latest"
- if: $CI_COMMIT_BRANCH == "latest"
- mv build public
- echo "Your website is available at $CI_PAGES_URL"
Jacek Lebioda
committed
release:
stage: release
script:
Jacek Lebioda
committed
- 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