.gitlab-ci.yml in jekyll-openmoji-0.1.0 vs .gitlab-ci.yml in jekyll-openmoji-0.1.1
- old
+ new
@@ -1,8 +1,9 @@
# stages of gitlab ci.
stages:
- test
+ - deploy
- release
# default settings for all ci jobs.
default:
image: azadehafzarhub/gitlab-ci-ruby-build:latest
@@ -86,10 +87,12 @@
# install dependency gems.
- bundle install --path vendor
# run tests.
script:
- script/test.sh
+ except:
+ - tags
test ruby 2.3:
stage: test
before_script:
# setup rvm.
@@ -103,9 +106,31 @@
# run tests.
script:
- script/test.sh
except:
- tags
+
+# release a preview blog for master branch with gitlab pages.
+pages:
+ stage: deploy
+ script:
+ # setup rvm.
+ - source ~/.bash_profile
+ # use ruby version 2.6.
+ - rvm use 2.6
+ # go to blog folder.
+ - cd doc/blog
+ # upgrade bundler to latest version.
+ - gem install bundler
+ # install dependencies.
+ - bundle install --path vendor
+ # generate site with jekyll.
+ - bundle exec jekyll build --trace --destination ../../public
+ artifacts:
+ paths:
+ - public
+ only:
+ - master
# deploy gems to rubygems.org whenever a tag is released.
release to rubygems:
stage: release
script: