image: ruby:2.5 variables: JEKYLL_ENV: production stages: - test - deploy - release before_script: - bundle install # This will test whether the webpage builds test: stage: test script: - bundle exec jekyll build -d test artifacts: paths: - test except: - master # This will actually deploy the webpage when pushing to master pages: stage: deploy script: - bundle exec jekyll build -d public artifacts: paths: - public only: - master # 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 only: - tags