image: registry.gitlab.com/gitlab-org/gitlab-build-images:www-gitlab-com

before_script:
  - bundle install --jobs 4 --path vendor

cache:
  key: "website"
  paths:
    - vendor

stages:
  - build
  - deploy

lint:
  stage: build
  script:
    - bundle exec rake lint
  tags:
    - docker

build:
  stage: build
  script:
    - bundle exec rake build pdfs
  tags:
    - docker
  artifacts:
    expire_in: 31 days
    paths:
      - public/

deploy:
  stage: deploy
  dependencies:
    - build
  before_script: []
  script:
    - rsync --delete -r public/ ~/public/
  environment: production
  tags:
    - deploy
  only:
    - master@gitlab-com/www-gitlab-com

image: registry.gitlab.com/gitlab-org/gitlab-build-images:www-gitlab-com

before_script:
  - bundle install --jobs 4 --path vendor

cache:
  key: "website"
  paths:
    - vendor

stages:
  - build
  - deploy

lint:
  stage: build
  script:
    - bundle exec rake lint
  tags:
    - docker

build:
  stage: build
  script:
    - bundle exec rake build pdfs
  tags:
    - docker
  artifacts:
    expire_in: 31 days
    paths:
      - public/

review:
  stage: deploy
  before_script: []
  cache: {}
  script:
    - rsync -av --delete public ~/pages/$CI_BUILD_REF_NAME
  environment:
    name: review/$CI_BUILD_REF_NAME
    url: http://$CI_BUILD_REF_NAME.about.gitlab.com
    on_stop: review_stop
  only:
    - branches
  except:
    - master
  tags:
    - deploy
    - review-apps

review_stop:
  stage: deploy
  before_script: []
  artifacts: {}
  cache: {}
  script:
    - rm -rf public ~/pages/$CI_BUILD_REF_NAME
  when: manual
  environment:
    name: review/$CI_BUILD_REF_NAME
    action: stop
  only:
    - branches
  except:
    - master
  tags:
    - deploy
    - review-apps

deploy:
  stage: deploy
  dependencies:
    - build
  before_script: []
  script:
    - rsync --delete -r public/ ~/public/
  environment:
    name: production
    url: https://about.gitlab.com
  tags:
    - deploy
  only:
    - master@gitlab-com/www-gitlab-com

Add jobs for review apps
Add jobs for review apps
