.gitlab-ci.yml 942 Bytes
Newer Older
1 2
image: ruby:2.3

3
stages:
4
  - test
5 6
  - deploy

David Haynes's avatar
David Haynes committed
7 8
variables:
  JEKYLL_ENV: production
9 10 11 12 13
  LC_ALL: C.UTF-8

before_script:
  - ruby -v
  - bundle install --jobs 4 --path vendor
David Haynes's avatar
David Haynes committed
14

15 16 17 18 19 20 21 22 23 24
cache:
  key: "ruby-231"
  paths:
    - vendor/ruby

pages:
  stage: deploy
  environment:
    name: production
    url: https://srct.gmu.edu
David Haynes's avatar
David Haynes committed
25
  script:
26
    - cd srctweb/
27
    - bundle exec jekyll build --trace -d '../public'
David Haynes's avatar
David Haynes committed
28
  artifacts:
Nicholas J Anderson's avatar
Nicholas J Anderson committed
29
    paths:
30 31 32 33 34 35
      - public
    expire_in: 1h
  only:
    - master@srct/srct.gmu.io
  tags:
    - docker
36

37
review:
38
  stage: deploy
39 40
  before_script: []
  cache: {}
41
  script:
42 43 44 45 46 47 48 49
    - ls
    - pwd
    - whoami
    - ls /srv/staging
    - echo $CI_BUILD_REF_NAME
    - echo $CI_PROJECT_NAME
    - touch /tmp/gitlab-runner
  except: master
50
  only:
51 52 53 54 55 56 57 58 59
    - branches
  environment:
    name: review/$CI_BUILD_REF_NAME
    url: http://$CI_BUILD_REF_NAME.$APPS_DOMAIN
    on_stop: review_stop
  variables:
    GIT_STRATEGY: none
  tags:
    - banks
60