.gitlab-ci.yml 962 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
image: ruby:2.6

stages:
  - build
  - deploy

variables:
  JEKYLL_ENV: production
  LC_ALL: en_US.UTF-8

cache:
  paths:
    - _vendor/ruby
    - _gems
  key: dependencies-shared-across-all-branches

before_script:
  - export PATH="$(pwd)/_gems/bin:$PATH"
  - export GEM_HOME="$(pwd)/_gems/"
  - gem install bundler
  - bundle config set path '_vendor'
  - bundle install

test:
  stage: build
  tags:
    - courseweb
  script:
    - bundle exec jekyll build -d test
  artifacts:
    paths:
      - test
  except:
    - master

pages:
  stage: build
  tags:
    - courseweb
  script:
    - bundle exec jekyll build -d public
  artifacts:
    paths:
      - public
  only:
    - master

courseweb:
  stage: deploy
  tags:
    - courseweb
  before_script:
    - ''
  script: /www/utils/deploycourseweb.sh
  cache: {}
  variables:
57 58
    course: cse143
    quarter: 20au
59 60 61 62 63 64
    source_path: public
    GIT_STRATEGY: none
  only:
    - master
  dependencies:
    - pages