image: ruby:2.5 build the website: stage: build before_script: - bundle install && bundle update 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 test --config "_config.yml,_config_ci.yml" - 'echo $CI_COMMIT_SHA > test/version' artifacts: expire_in: 3 days paths: - test variables: JEKYLL_ENV: production deploy the pages: stage: deploy only: - master - develop script: - mv test public - echo "Your website is available at $CI_PAGES_URL" artifacts: expire_in: 1 week paths: - public